flyrain commented on code in PR #10722:
URL: https://github.com/apache/iceberg/pull/10722#discussion_r1768913951


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3103,6 +3103,81 @@ components:
         uuid:
           type: string
 
+    ADLSCredentials:
+      type: object
+      allOf:
+        - $ref: '#/components/schemas/Credentials'
+      required:
+        - type
+      properties:
+        type:
+          type: string
+          enum: [ "adls" ]
+        account-name:
+          type: string
+        account-key:
+          type: string
+        sas-token:
+          type: string
+        expires-at-ms:
+          type: integer
+          format: int64
+
+    GCSCredentials:
+      type: object
+      allOf:
+        - $ref: '#/components/schemas/Credentials'
+      required:
+        - type
+        - token
+        - expires-at-ms
+      properties:
+        type:
+          type: string
+          enum: [ "gcs" ]
+        token:
+          type: string
+        expires-at-ms:
+          type: integer
+          format: int64
+
+    S3Credentials:
+      type: object
+      allOf:
+        - $ref: '#/components/schemas/Credentials'
+      required:

Review Comment:
   > those are all Java-specific and other languages might use other property 
names for the respective FileIO implementation
   
   I didn’t quite get that. Clients in other languages should stick to the 
names defined in the spec. I can’t imagine the server responding with different 
config keys, like the S3 region, just because the client is implemented in a 
different language.
   
   Thanks for sharing the PR to add more comments. I'm OK with 
**non-stardadrized** **schema-less** for configs as they may change, but I 
still think it is more organized with one more layer like the following. As I 
said,  this is a minor point to make the overall schema a bit cleaner, esp. for 
new storage type adding in the future. 
   ```
   LoadTableResponse:
     storages:
             type: array
             items:
               $ref: '#/components/schemas/Storage'
   
   storage:
         type: object
         discriminator:
           propertyName: type
           mapping:
             adls: '#/components/schemas/adls'
             gcs: '#/components/schemas/gcs'
             s3: '#/components/schemas/s3'
         oneOf:
            ...
   
   s3
     - type(s3/adsl/gcs)
     - credentials
     - config     <- schema-less key-value pairs, add comments here for storage 
related configs
   ```
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to