Closed
Description
At the moment the spec says:
Otherwise [if items is not an array], "additionalItems" MUST be ignored, as the "items" schema (possibly the default value of an empty schema) is applied to all elements.
That causes a lot of confusion from users. The suggestion is to prohibit additionalItems (rather then require ignoring it) and enforce it via meta-schema unless items is present and it is an array.
The meta-schema will be inside dependencies, together with exclusiveMaximum and exclusiveMinimum (#189 (comment))
"dependencies": {
"additionalItems": {
"required": ["items"],
"properties": { "items": { "type": "array" } }
}
}
The spec also becomes simpler:
Otherwise [if items is not an array], "additionalItems" MUST NOT be present
@awwright @handrews @Relequestual if that makes sense, I can make a PR