Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update discriminator to have the correct mapping #881

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Conversation

ashwinb
Copy link
Contributor

@ashwinb ashwinb commented Jan 26, 2025

See https://swagger.io/docs/specification/v3_0/data-models/inheritance-and-polymorphism/#discriminator

When specifying discriminators, mapping must be specified unless the value of the discriminator is the subtype itself (which in our case is not.)

The changes in the YAML are self-explanatory.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 26, 2025
class ResponseFormatType(Enum):
json_schema = "json_schema"
grammar = "grammar"


@json_schema_type
Copy link
Contributor Author

Choose a reason for hiding this comment

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

also this should end up fixing the jsonschema related issues encountered in kotlin

@ashwinb ashwinb merged commit e5936a8 into main Jan 27, 2025
2 checks passed
@ashwinb ashwinb deleted the better_openapi branch January 27, 2025 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants