Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prefixItems keyword omitted behavior #1481

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions jsonschema-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ results.

##### `prefixItems`

The value of "prefixItems` MUST be a non-empty array of valid JSON Schemas.
The value of `prefixItems` MUST be a non-empty array of valid JSON Schemas.

Validation succeeds if each element of the instance validates against the
subschema at the same position, if any. This keyword does not constrain the
Expand All @@ -1844,8 +1844,6 @@ this keyword applied a subschema. The value MAY be a boolean true if a subschema
was applied to every index of the instance, such as is produced by the `items`
keyword. This annotation affects the behavior of `items` and `unevaluatedItems`.

Omitting this keyword has the same assertion behavior as an empty array.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to specify what the behavior of omitting the keyword is. (Either that or remove all other omission clauses; probably not.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compare to allOf and friends, just removing it is consistent with how they are. Plenty of other keywords don't include a comparable sentence.


##### `items` {#items}

The value of `items` MUST be a valid JSON Schema.
Expand Down
Loading