Skip to content

OpenAPI: Add missing type: object to AssertViewUUID - #18099

Merged
nastra merged 1 commit into
apache:mainfrom
c-thiel:open-api-assert-view-uuid-type-object
Oct 19, 2026
Merged

nastra merged 1 commit into
apache:mainfrom
c-thiel:open-api-assert-view-uuid-type-object

Conversation

@c-thiel

@c-thiel c-thiel commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

AssertViewUUID is the only schema the ViewRequirement discriminator maps to, but it does not say it is an object. OpenAPI requires a discriminator target to be an object schema or an allOf, so tools cannot tell what this schema is.

This looks like a leftover from #11955.

The wire format and the meaning of the schema do not change, and the generated Python code is unchanged.

AssertViewUUID is the only schema the  ViewRequirement discriminator maps to, but it does not say it is an object. OpenAPI requires a discriminator target to be an object schema or an allOf, so tools cannot tell what this schema is.

This looks like a leftover from apache#11955.

The wire format and the meaning of the schema
do not change, and the generated Python code is unchanged.

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @c-thiel!

- $ref: '#/components/schemas/AssertViewUUID'

AssertViewUUID:
type: object

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about other Assert* definitions like AssertTableUUID or AssertRefSnapshotId? Or does AssertViewUUID actually need

      allOf:
        - $ref: '#/components/schemas/ViewRequirement'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Oct 17, 2026
@nastra
nastra merged commit f2b45bd into apache:main Oct 19, 2026
25 checks passed
danielcweeks pushed a commit to danielcweeks/iceberg that referenced this pull request Oct 19, 2026
AssertViewUUID is the only schema the  ViewRequirement discriminator maps to, but it does not say it is an object. OpenAPI requires a discriminator target to be an object schema or an allOf, so tools cannot tell what this schema is.

This looks like a leftover from apache#11955.

The wire format and the meaning of the schema
do not change, and the generated Python code is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants