Description
The spec says of prefixItems
:
The value of "prefixItems" MUST be a non-empty array of valid JSON Schemas.
Then ends with:
Omitting this keyword has the same assertion behavior as an empty array.
Specifying that an omitted prefixItems
behaves the same as a value that it must not be looks wrong. Comparing to allOf
/anyOf
/oneOf
which also must be non-empty arrays of schemas, they omit the sentence about omitting the keyword.
I'm not sure why any of these must be non-empty - sure, when empty they end up either just allowing everything (prefixItems
, allOf
) or nothing (anyOf
, oneOf
), but plenty of other keywords allow similar degenerate cases, e.g. minItems
may be 0 allowing everything and enum
may be empty allowing nothing. That's just an observation, not a battle I am itching to take on, and I'm sure it's all been discussed before.