rdblue commented on code in PR #7569:
URL: https://github.com/apache/iceberg/pull/7569#discussion_r1199832113


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -1756,6 +1871,29 @@ components:
           items:
             $ref: '#/components/schemas/TableUpdate'
 
+    CommitTransactionTableRequest:
+      type: object
+      required:
+        - identifier
+        - requirements
+        - updates
+      properties:
+        identifier:
+          $ref: '#/components/schemas/TableIdentifier'
+        requirements:
+          type: array
+          items:
+            $ref: '#/components/schemas/TableRequirement'
+        updates:
+          type: array
+          items:
+            $ref: '#/components/schemas/TableUpdate'
+
+    CommitTransactionRequest:
+      type: array

Review Comment:
   I don't think this should be an array. The problem with using an array is 
that you can't make top-level additions to the request without changing its 
type. Using an object allows you to add optional keys later. For example, what 
happens if we want to create and track a transaction ID? That would need to be 
added here.
   
   Instead of an array, I think we should use a structure like this:
   
   ```yaml
       CommitTransactionRequest:
         type: object
         required:
           - table-changes
         properties:
           table-changes:
             type: array
             items:
               description: Table commit request; must provide an `identifier`
               $ref: '#/components/schemas/CommitTableRequest'
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to