Skip to content

resolve contradictions in the described behaviour of "additionalProperties" and "items" #1154

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

Closed
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
26 changes: 5 additions & 21 deletions jsonschema-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2302,10 +2302,7 @@
<t>
This keyword applies its subschema to all instance elements
at indexes greater than the length of the "prefixItems" array
in the same schema object, as reported by the annotation result
of that "prefixItems" keyword. If no such annotation
result exists, "items" applies its subschema to all instance
array elements.
in the same schema object.
<cref>
Note that the behavior of "items" without "prefixItems" is
identical to that of the schema form of "items" in prior drafts.
Expand All @@ -2323,12 +2320,6 @@
Omitting this keyword has the same assertion behavior as
an empty schema.
</t>
<t>
Implementations MAY choose to implement or optimize this keyword
in another way that produces the same effect, such as by directly
checking for the presence and size of a "prefixItems" array.
Implementations that do not support annotation collection MUST do so.
</t>
</section>

<section title="contains">
Expand Down Expand Up @@ -2408,12 +2399,12 @@
The value of "additionalProperties" MUST be a valid JSON Schema.
</t>
<t>
The behavior of this keyword depends on the presence and
annotation results of "properties" and "patternProperties"
The behavior of this keyword depends on the presence
of "properties" and "patternProperties"
within the same schema object.
Validation with "additionalProperties" applies only to the child
values of instance names that do not appear in the annotation
results of either "properties" or "patternProperties".
values of instance names that do not match any names in "properties",
and do not match any regular expression in "patternProperties".
</t>
<t>
For all such properties, validation succeeds if the child instance
Expand All @@ -2427,13 +2418,6 @@
Omitting this keyword has the same assertion behavior as
an empty schema.
</t>
<t>
Implementations MAY choose to implement or optimize this keyword
in another way that produces the same effect, such as by directly
checking the names in "properties" and the patterns in
"patternProperties" against the instance property set.
Implementations that do not support annotation collection MUST do so.
</t>
</section>

<section title="propertyNames">
Expand Down