c-thiel commented on code in PR #18099:
URL: https://github.com/apache/iceberg/pull/18099#discussion_r4027753103


##########
open-api/rest-catalog-open-api.yaml:
##########
@@ -3823,6 +3823,7 @@ components:
         - $ref: '#/components/schemas/AssertViewUUID'
 
     AssertViewUUID:
+      type: object

Review Comment:
   Thanks for taking a look!
   
   `AssertTableUUID`, `AssertRefSnapshotId` etc. don't need it. They all have 
`allOf: [$ref TableRequirement]`, and `TableRequirement` is `type: object`, so 
they inherit it. `AssertViewUUID` can't inherit anything because 
`ViewRequirement` is a `oneOf` union rather than a base class. Other `oneOf` 
members in this spec (`EmptyPlanningResult`, `AsyncPlanningResult`) declare 
`type: object` themselves, so this follows the existing convention. 
`AssertViewUUID` was the only discriminator target with neither `allOf` nor 
`type: object`.
   
   `allOf: [$ref ViewRequirement]` would create a cycle, since 
`ViewRequirement` already has `oneOf: [$ref AssertViewUUID]`. If you do that 
you will see generation failing with `maximum recursion depth exceeded`.



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