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

Question: possibility to add custom validations #191

Closed
peter-plochan opened this issue Mar 16, 2020 · 1 comment
Closed

Question: possibility to add custom validations #191

peter-plochan opened this issue Mar 16, 2020 · 1 comment

Comments

@peter-plochan
Copy link
Contributor

This is follow-up to #190.
In my OpenAPI 3 definition, I would like to introduce x-patternProperties vendor extension based on JSON-schema pattern properties. So let's assume that I have a schema with this extension containing a map of patterns with schemas.
Is there a possibility to add custom validation of such extension to the validator?

@fenollp
Copy link
Collaborator

fenollp commented Feb 23, 2021

While you should be able to decode and use the extension after/before native schema validation, I would suggest you aim for OpenAPIv3.1 support (if you can) as it sports standard JSON Schema schemas.
See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#schemaObject
cc #230

@fenollp fenollp closed this as completed Feb 23, 2021
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

2 participants