Tishj commented on issue #13305:
URL: https://github.com/apache/iceberg/issues/13305#issuecomment-2967846478

   @Fokko I've made a diff, is that sufficient?
   ```patch
   diff --git a/open-api/rest-catalog-open-api.yaml 
b/open-api/rest-catalog-open-api.yaml
   index e9d5ab9a1..3c9ff747d 100644
   --- a/open-api/rest-catalog-open-api.yaml
   +++ b/open-api/rest-catalog-open-api.yaml
   @@ -3090,47 +3090,48 @@ components:
            - $ref: '#/components/schemas/AddViewVersionUpdate'
            - $ref: '#/components/schemas/SetCurrentViewVersionUpdate'
    
   +    TableRequirementType:
   +      type: string
   +      enum:
   +        - assert-create
   +        - assert-table-uuid
   +        - assert-ref-snapshot-id
   +        - assert-last-assigned-field-id
   +        - assert-current-schema-id
   +        - assert-last-assigned-partition-id
   +        - assert-default-spec-id
   +        - assert-default-sort-order-id
   +
        TableRequirement:
   -      type: object
   -      discriminator:
   -        propertyName: type
   -        mapping:
   -          assert-create: '#/components/schemas/AssertCreate'
   -          assert-table-uuid: '#/components/schemas/AssertTableUUID'
   -          assert-ref-snapshot-id: '#/components/schemas/AssertRefSnapshotId'
   -          assert-last-assigned-field-id: 
'#/components/schemas/AssertLastAssignedFieldId'
   -          assert-current-schema-id: 
'#/components/schemas/AssertCurrentSchemaId'
   -          assert-last-assigned-partition-id: 
'#/components/schemas/AssertLastAssignedPartitionId'
   -          assert-default-spec-id: '#/components/schemas/AssertDefaultSpecId'
   -          assert-default-sort-order-id: 
'#/components/schemas/AssertDefaultSortOrderId'
   -      properties:
   -        type:
   -          type: string
   -      required:
   -        - type
   +      oneOf:
   +        - $ref: '#/components/schemas/AssertCreate'
   +        - $ref: '#/components/schemas/AssertTableUUID'
   +        - $ref: '#/components/schemas/AssertRefSnapshotId'
   +        - $ref: '#/components/schemas/AssertLastAssignedFieldId'
   +        - $ref: '#/components/schemas/AssertCurrentSchemaId'
   +        - $ref: '#/components/schemas/AssertLastAssignedPartitionId'
   +        - $ref: '#/components/schemas/AssertDefaultSpecId'
   +        - $ref: '#/components/schemas/AssertDefaultSortOrderId'
    
        AssertCreate:
          type: object
          description: The table must not already exist; used for create 
transactions
   -      allOf:
   -        - $ref: '#/components/schemas/TableRequirement'
          required:
            - type
          properties:
            type:
   -          type: string
   +          $ref: '#/components/schemas/TableRequirementType'
              const: "assert-create"
    
        AssertTableUUID:
   +      type: object
          description: The table UUID must match the requirement's `uuid`
   -      allOf:
   -        - $ref: '#/components/schemas/TableRequirement'
          required:
            - type
            - uuid
          properties:
            type:
   -          type: string
   +          $ref: '#/components/schemas/TableRequirementType'
              const: "assert-table-uuid"
            uuid:
              type: string
   @@ -3139,14 +3140,13 @@ components:
          description:
            The table branch or tag identified by the requirement's `ref` must 
reference the requirement's `snapshot-id`; 
            if `snapshot-id` is `null` or missing, the ref must not already 
exist
   -      allOf:
   -        - $ref: '#/components/schemas/TableRequirement'
          required:
   +        - type
            - ref
            - snapshot-id
          properties:
            type:
   -          type: string
   +          $ref: '#/components/schemas/TableRequirementType'
              const: "assert-ref-snapshot-id"
            ref:
              type: string
   @@ -3157,13 +3157,12 @@ components:
        AssertLastAssignedFieldId:
          description:
            The table's last assigned column id must match the requirement's 
`last-assigned-field-id`
   -      allOf:
   -        - $ref: '#/components/schemas/TableRequirement'
          required:
   +        - type
            - last-assigned-field-id
          properties:
            type:
   -          type: string
   +          $ref: '#/components/schemas/TableRequirementType'
              const: "assert-last-assigned-field-id"
            last-assigned-field-id:
              type: integer
   @@ -3171,13 +3170,12 @@ components:
        AssertCurrentSchemaId:
          description:
            The table's current schema id must match the requirement's 
`current-schema-id`
   -      allOf:
   -        - $ref: '#/components/schemas/TableRequirement'
          required:
   +        - type
            - current-schema-id
          properties:
            type:
   -          type: string
   +          $ref: '#/components/schemas/TableRequirementType'
              const: "assert-current-schema-id"
            current-schema-id:
              type: integer
   @@ -3185,13 +3183,12 @@ components:
        AssertLastAssignedPartitionId:
          description:
            The table's last assigned partition id must match the requirement's 
`last-assigned-partition-id`
   -      allOf:
   -        - $ref: '#/components/schemas/TableRequirement'
          required:
   +        - type
            - last-assigned-partition-id
          properties:
            type:
   -          type: string
   +          $ref: '#/components/schemas/TableRequirementType'
              const: "assert-last-assigned-partition-id"
            last-assigned-partition-id:
              type: integer
   @@ -3199,13 +3196,12 @@ components:
        AssertDefaultSpecId:
          description:
            The table's default spec id must match the requirement's 
`default-spec-id`
   -      allOf:
   -        - $ref: '#/components/schemas/TableRequirement'
          required:
   +        - type
            - default-spec-id
          properties:
            type:
   -          type: string
   +          $ref: '#/components/schemas/TableRequirementType'
              const: "assert-default-spec-id"
            default-spec-id:
              type: integer
   @@ -3213,13 +3209,12 @@ components:
        AssertDefaultSortOrderId:
          description:
            The table's default sort order id must match the requirement's 
`default-sort-order-id`
   -      allOf:
   -        - $ref: '#/components/schemas/TableRequirement'
          required:
   +        - type
            - default-sort-order-id
          properties:
            type:
   -          type: string
   +          $ref: '#/components/schemas/TableRequirementType'
              const: "assert-default-sort-order-id"
            default-sort-order-id:
              type: integer
   
   ```


-- 
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