-
Notifications
You must be signed in to change notification settings - Fork 145
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 with items array #311
Comments
I traced the issue to that line |
seems that there are a problem with indexing - it tries to use an array as object and uses array index as object key |
probably it is related to that comment: json-schema-validator/src/json-validator.cpp Lines 213 to 216 in 08d8a52
but I can not understand what that means. Is there a reason why it doesn't use json pointer directly? |
If I understood everything correctly, the that pr should fix the issue |
So, it seems there is a bug with the handling of unknown keywords. Your schema shows that. But why we have the unknown keyword handling getting involved here? Because |
Yeah, that is fair. I'm not sure what I should do with that issue then... I mean should I close it or keep it? |
Well, it is still a bug with the unknown keyword handling, I'd need a better explanation as to why this happens before merging your PR. |
The errors wasn't the Your fix was correct and elegant: using a json-pointer to resolve the direct sub-keyword instead of |
For tuple validation json schema allows usage of
items
keyword as an array, for example like here:Also, we can use it in
$defs
too, like here:And that works perfectly with the library. But if I put
$comment
inside of one of the items, then I have exception:So, that schema will throw the exception when you try to set it to validator
Looks like only
$comment
keyword doesn't work properly in that contextThe text was updated successfully, but these errors were encountered: