-
-
Notifications
You must be signed in to change notification settings - Fork 878
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
Extending properties with $ref #260
Comments
You are right. Ajv doesn't comply with this provision, it allows extending $refs with additional keywords.
In this case the 1st or 2nd option could become the default in the next major version. |
@epoberezkin can you expand on what we need to change here? I'm getting this warning now and it pointed me here but I'm not quite sure what the implications are. I'm currently using |
Oh. I think this is a false positive for my case, after reading this more closely. My schema looks like:
"coerceTo" and "instanceOf" are custom keywords, but as far as the definition goes there is no other keyword other than |
Could you please submit a new issue - it may be a bug |
ah! apologies after some deep diving I discovered I am indeed auto-generating some schema bits that use a custom keyword with |
There will be an option to preserve the current behaviour. |
in 4.4.0 |
Dear @epoberezkin first of all thank you for so nice and powerful project,
and AJV in this case just ignore extra filed and uses on properties from the basic.
Thank you in advanced. |
Ajv now ignores all siblings to $ref but it can be changed with options. See the docs. |
@epoberezkin, thank you for quick response, so TBH quite difficult to find correct option :-), I tried to play with extendRefs: true, inlineRefs: false} |
@epoberezkin we still could not find proper options, tend to think that hierarchy described above (schema extending inside definitions) is impossible for now, but could you please give us a hint what |
Considering the following schema
I currently get the following results when validating against a range of input objects
{ "prop": 10 }
true
{ "prop": 1 }
false
{ "propWithAllOf": 10 }
true
{ "propWithAllOf": 1 }
false
According to the JSON spec
Does that mean the second result should be
true
? Thanks!The text was updated successfully, but these errors were encountered: