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

Check constraint on discriminator property #54

Open
fredbi opened this issue Jan 2, 2018 · 0 comments
Open

Check constraint on discriminator property #54

fredbi opened this issue Jan 2, 2018 · 0 comments

Comments

@fredbi
Copy link
Member

fredbi commented Jan 2, 2018

As per swagger 2.0 spec (https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md), we have the following constraint:

discriminator string Adds support for polymorphism. The discriminator is the schema property name that is used to differentiate between other schema that inherit this schema. The property name used MUST be defined at this schema and it MUST be in the required property list. When used, the value MUST be the name of this schema or any schema that inherits it.

This is currently not checked by the spec validation package.

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

No branches or pull requests

1 participant