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

Support for discriminator #76

Open
barnaclebarnes opened this issue Mar 23, 2021 · 0 comments
Open

Support for discriminator #76

barnaclebarnes opened this issue Mar 23, 2021 · 0 comments

Comments

@barnaclebarnes
Copy link

In the API spec it has information on the discriminator property to specify a hierarchy - https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/

allOf

OpenAPI lets you combine and extend model definitions using the allOf keyword. allOf takes an array of object definitions that are used for independent validation but together compose a single object. Still, it does not imply a hierarchy between the models. For that purpose, you should include the discriminator. To be valid against allOf, the data provided by the client must be valid against all of the given subschemas. In the following example, allOf acts as a tool for combining schemas used in specific cases with the general one. For more clearness, oneOf is also used with a discriminator.

I don't see that this is supported in this library yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant