-
Notifications
You must be signed in to change notification settings - Fork 331
unevaluatedProperties and unevaluatedItems keywords are not implemented #276
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
Comments
@ssilverman You are correct that it is not implemented yet. We implemented most of the validators but there are still some pending. I am wondering if you could submit a PR for this validator. Thanks. |
Ah, I hadn't realized the 2019-09 support wasn't complete yet, that's why I filed this issue. I can't promise I have time at the moment, but I'm going to have a look at the code. Any implementation guidance for newcomers? Specifically, |
@ssilverman The library is a flexible plugin structure. Here are some of the points that I can think of.
Let me know when you encounter any specific questions. Thanks. |
I started here: ssilverman@35a8889 Does this look correct so far? What is I think I'll need some guidance when adding "peering into" the in-place applicators ( |
You are on the right path. Here is the document talking about the version. https://github.com/networknt/json-schema-validator/blob/master/doc/specversion.md |
I added the in-place applicator collection in the See: https://github.com/ssilverman/json-schema-validator/commits/add-unevaluated-props |
@ssilverman To be honest, I am far behind as I am still learning the spec. I am wondering if this is already published or not. The only document I can find is this issue. Let me know if you have any official links for us to learn. I looked at your code and it looks pretty complicated. I am wondering if you could create a document in the /doc folder to write down your implementation ideas. In this way, it might be easier for other developers to understand what you are trying to archive and help you if needed. Thanks. |
It's published in the 2019-09 draft (https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.3.2.4). As for the complexity, I'm just following the existing code style for the other validators. "unevaluatedProperties" is similar to "additionalProperties", but it also has to look at any sibling "additionalProperties", "oneOf", "allOf", "anyOf", "not", and "ref" contents. How could I make it simpler? I don't yet know your code base that well. |
@ssilverman Thanks for the link. It is not very clear what needs to be done by reading for that paragraph :) My understanding is that we need to iterate all the siblings. Do we need to drill down to the siblings? Or we just need to evaluate it at the same level? I don't think there is a simpler way to do so. @prashanthjos has created a collector to collect useful info during the validation and it could iterate all validators. I am wondering if it could help. #268 |
Since the new keyword |
@gjvoosten Good idea. I have changed the title to cover both keywords. Thanks. |
@ssilverman Just looking at your branch. Maybe it would be better to add an interface, something like: public boolean wouldHandleProperty(JsonNode node, String propertyName); Then the |
@Gaff I ended up writing my own validator :) |
@ssilverman I am assuming you add some dummy validators that doing nothing to map to these keywords. |
@stevehu do you mean in my validator? |
@ssilverman I am sorry. I thought this thread is talking about the warning messages for the un-implemented keywords. Please ignore my message above. Thanks. |
Any PR? |
According to my testing, it doesn't appear that
unevaluatedProperties
from 2019-09 is implemented. If I'm correct, are there plans to add support?The text was updated successfully, but these errors were encountered: