"unevaluatedItems" and "contains", "minContains", and "maxContains" #293
Labels
missing test
A request to add a test to the suite that is currently not covered elsewhere.
Milestone
This is a little vague in the spec, as discussed in json-schema-org/json-schema-spec#810, but will be clarified in a bug fix and we should go ahead and test for it from the start.
contains
gets applied to all elements of the array, and excludes any element to which it applied successfully fromunevaluatedItems
. This produces an interesting and potentially useful behavior of carving out exceptions in an otherwise homogenous array, which you can't otherwise do.Given:
The following instances should all be valid:
[true, "hello", false]
[1, 3, 4]
[true, false]
Note that
minContains
andmaxContains
shouldn't affect this (although I don't think there's any meaningful interaction withmaxContains
as matching less is no different than if it's not there, and matching more causes it to fail validation):contains
matches more than the minimum, all of those should be excluded fromunevaluatedItems
, not just the first however many up to the minimumThe text was updated successfully, but these errors were encountered: