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 Schema Level Validation #142

Open
zacharymostowsky opened this issue Mar 16, 2021 · 0 comments
Open

Support for Schema Level Validation #142

zacharymostowsky opened this issue Mar 16, 2021 · 0 comments

Comments

@zacharymostowsky
Copy link

Hello,

Thanks for the great library. I have the use case for schema level validation. My specific example is that I have a field and if it is true I want to require several other fields. I have multiple fields like this on the same level in the schema.

My plan was to add a key in the metadata of the object to store some objects that represent conditions (i.e. fieldA > 5 or fieldB == True) and a list of conditionally require fields (i.e. fields=[field1, field2]). I can then find if this key exists, create an allOf block in my JSON and populate that with if conditions constructed from the above objects.

Is this something others are interested in and/or would be considered for a merge? I know it is quite specific but perhaps could serve as a starting point.

Thanks,
Zach

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