Description
For "additionalItems", the spec states:
If the "additionalItems" subschema is applied to any positions within the instance array, it produces an annotation result of boolean true
For "additionalProperties", the spec states:
The annotation result of this keyword is the set of instance property names validated by this keyword's subschema.
To me, this implies that "additionalItems" is only applied if there are things to apply it to, and if that set is empty, there's no "additionalItems" annotation. On the other hand, "additionalProperties" seems to imply that it produces an annotation even if the set is empty.
If the keyword is present, and both return true
for empty sets, I'd like to see these behave the same with regards to annotations. i.e. we either choose to add an annotation or we don't. Since section 10.3.4 Error or Anotation states that an "annotation" annotation can be produced for a successful validation, that would seem to lend weight to the preference to produce an annotation for both keywords when they operate on an empty set. Thoughts?