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

Schema patching as user extension point? #5

Open
handrews opened this issue Apr 29, 2023 · 0 comments
Open

Schema patching as user extension point? #5

handrews opened this issue Apr 29, 2023 · 0 comments

Comments

@handrews
Copy link
Collaborator

One way for a user familiar with JSON Schema to extend the validation rules would be further patch the OAS schema(s). For example, an additional pattern keyword applied to result statuses could be used to enforce that result codes only come from a certain set.

It might be helpful to allow configuring a list of JSON Patch or JSON Merge Patch documents (in json or yaml) to be applied in order prior to running schema validation. The different formats are easy to distinguish - a JSON Patch is always an array, and for patching these schemas, a JSON Merge Patch will always be an object.

This would not be the most user-friendly extension point, but it would be easy to support and very powerful for those who are comfortable with it.

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