You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @shoops
From what I can see comparing the original schema from yours, you suggest to drop type and additionalProperties from obj's properties.
I'm not sure to understand the reason, however: according to the 2020-12 draft
The "$ref" keyword is an applicator that is used to reference a statically identified schema. Its results are the results of the referenced schema. Note that this definition of how the results are determined means that other keywords can appear alongside of "$ref" in the same schema object.
I may have misunderstood the paragraph, but to me this means that
the two fields are allowed
they are "merged" with the definition in the referenced object
2.1 in this specific case they are not necessary, but shouldn't change the behavior of the validator
Yes, that is correct but the problem is that the "additinalProperties": false is evaluated without any properties being defined. I have seen this behavior with all schema validators I tried. You can use "additionalProperties": "[or]" which would allow only properties o and r.
I am encountering an unexpected behavior from
ajv-cli
.with the following
sch.json
and the following
dat.json
but the field
r
is required, and must be set.The text was updated successfully, but these errors were encountered: