-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Bug: allOf schemas seem to ignore conditional branches when used with .apply().basic() #318
Comments
Sorry for the late answer! Thank you so much for such a detailed bug report :) I will take a look at it soon |
I fixed the error in my local branch, will work on a few other things and release a new version :) Thanks once again for reporting |
Stranger6667
added a commit
that referenced
this issue
Dec 8, 2021
… schemas with `if` and `then` (without `else`) keywords Ref: #318
Merged
Stranger6667
added a commit
that referenced
this issue
Dec 8, 2021
… schemas with `if` and `then` (without `else`) keywords Ref: #318
The fix is released in |
Nice, thank you so much! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
There seems to be something wrong with the new
.apply()
feature when using in conjunction with the pattern of using allOf as a iterator for if then else conditionals, as recommended by the documentation on: https://json-schema.org/understanding-json-schema/reference/conditionals.htmlFor brevity sake I won't paste the same schema and examples here again, but it is exactly the ones used below the quote on the link,
Or, if you prefer, you can also find the same schema example and a valid input on this link
The problem
All correct inputs are being denied, which seems to point that the program is trying to validate all schemas on allOf, when it should evaluate conditionally to only one of them.
Below I will provide the code used to test these and dependency versions.
Output Example:
(notice the
"valid":false
at the end of the result)src/main.rs
Cargo.toml
The text was updated successfully, but these errors were encountered: