JSON-Schema-Test-Suite icon indicating copy to clipboard operation
JSON-Schema-Test-Suite copied to clipboard

"unevaluatedItems", "additionalItems", and tuple "items"

Open handrews opened this issue 6 years ago • 0 comments

unevaluatedItems should apply to instance items past the end of the items tuple the same way as additionalItems, except that it works with items across a reference or allOf or whatever.

If additionalItems is present with items, then (because that subschema will only pass if both items and additionalItems pass), unevaluatedItems is always ignored. additionalItems consumes the whole remainder of the array.

  • [x] test unevaluatedItems with tuple items only, same-object: here
  • [x] test unevaluatedItems with tuple items only, through applicator: here
  • [x] test unevaluatedItems with tuple items and additionalItems, same object: here
  • [x] test unevaluatedItems with tuple items and additionalItems, through applicator: here
  • [ ] test unevaluatedItems ignores additionalItems without items, same object
  • [ ] test unevaluatedItems ignores additionalItems without items, through applicator

Note that putting items and additionalItems in separate applicator subschemas is identical to just having items, as a lone additionalItems always has no effect.

handrews avatar Oct 20 '19 23:10 handrews