You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The spec says of
prefixItems
:Then ends with:
Specifying that an omitted
prefixItems
behaves the same as a value that it must not be looks wrong. Comparing toallOf
/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 andenum
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.Related: #975 / #1001
The text was updated successfully, but these errors were encountered: