-
Notifications
You must be signed in to change notification settings - Fork 329
feat(json-schema): Add discriminator support and oneOf/anyOf union option #9038
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
feat(json-schema): Add discriminator support and oneOf/anyOf union option #9038
Conversation
commit: |
|
All changed packages have been documented.
Show changes
|
|
/azp run typespec - pr tools |
|
Azure Pipelines successfully started running 1 pipeline(s). |
timotheeguerin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just nit on the test name
|
/azp run typespec - pr tools |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
You can try these changes here
|
|
/azp run typespec - pr tools |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Summary
Adds support for discriminator properties in JSON Schema emitter with an opt-in oneOf/anyOf union generation option.
Changes
@discriminatordecoratorpolymorphic-models-strategyemitter option to generate oneOf or anyOf schemas for closed discriminated unionsTesting
Documentation
All tests passing. Changeset included for release notes.