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 validation of oneOf using OpenAPI spec Discriminator #100

Open
captain828 opened this issue Jul 6, 2024 · 0 comments
Open

Support validation of oneOf using OpenAPI spec Discriminator #100

captain828 opened this issue Jul 6, 2024 · 0 comments

Comments

@captain828
Copy link

Given that #99 has led to validation being disabled for oneOf and anyOf members, I suggest implementing the OpenAPI 3.0 spec discriminator.

This would only function for the oneOf use case and would be the only way to validate oneOf members.
This would solve the complexity of having to validate against all models while ensuring that only one of the models is valid.

For the anyOf use case, IMO we should ignore it for now and come back to it later.

Let me know what you think about this improvement proposal.
I would be happy to contribute to this if you can give me some pointers on how to set things up for dev.

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