-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
built-in function to check is schema valid. is_schema_valid(jsonObj, jsonShema) returning true/false #5417
Comments
we need this functionality in OPA and we can implement this function. The only we need is detailed guide how to do that? |
Is it OK if function declaration would be like this ? res := { or res := { |
Heya! Thanks for your willingness to contribute! 👏 That proposed return value is something we need to reconsider, though: all other I don't believe there's a precedent here, we don't have methods that would return a list of errors if validation fails. Is that your use case? |
Hi! Let me explain our case. So, next points are important for us:
And, I can image and implement one of next contracts:
Of course, we can follow classical way with 2 built-ins Can I have any advice? Thanks! |
I've just realised that there has been some prior discussion here, too: #1449 Just catching up myself 😅 👀 |
Indeed. Since there is already an open issue for this, with several upvotes, and prior discussion, let's continue there. |
adding bult-in function in rego to check is json object valid against json schema
What is the underlying problem you're trying to solve?
Describe the ideal solution
Describe a "Good Enough" solution
Additional Context
The text was updated successfully, but these errors were encountered: