Skip to content

Commit c4953f1

Browse files
committed
removed mention of indices from items; fix type in contains
1 parent 2314795 commit c4953f1

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

jsonschema-core.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -1654,10 +1654,11 @@ The presence of this keyword affects the behaviors of [`items`](#items) and
16541654

16551655
The value of `items` MUST be a valid JSON Schema.
16561656

1657-
This keyword applies its subschema to all instance elements at indices greater
1658-
than the length of the `prefixItems` array in the same schema object. If
1659-
`prefixItems` does not exist within the same schema object, `items` applies its
1660-
subschema to all instance array elements.
1657+
This keyword ignores elements in the instance array equal to the number of
1658+
subschemas found in the `prefixItems` array in the same schema object, starting
1659+
from the beginning of the instance array. It then applies its subschema to
1660+
remaining instance elements. If `prefixItems` does not exist within the same
1661+
schema object, `items` applies its subschema to all instance array elements.
16611662

16621663
If the `items` subschema is applied to any positions within the instance array,
16631664
it produces an annotation result of boolean true, indicating that all remaining
@@ -1766,18 +1767,18 @@ Validation MUST always succeed against this keyword. The value of this keyword
17661767
is used as its annotation result.
17671768

17681769
Per {{default-behaviors}}, omitted keywords MUST NOT produce annotation results.
1769-
However, as described in the section for `contains`, the absence of this
1770-
keyword's annotation causes `contains` to assume a minimum value of 1.
1770+
However, as described in {{contains}}, the absence of this keyword's annotation
1771+
causes `contains` to assume a minimum value of 1.
17711772

1772-
##### `contains`
1773+
##### `contains` {#contains}
17731774

17741775
The value of this keyword MUST be a valid JSON Schema.
17751776

17761777
This keyword applies to array instances by applying its subschema to the array's
17771778
elements.
17781779

17791780
An instance is valid against `contains` if the number of elements that are valid
1780-
against its subschema is with the inclusive range of the minimum and (if any)
1781+
against its subschema is within the inclusive range of the minimum and (if any)
17811782
maximum number of occurrences.
17821783

17831784
The maximum number of occurrences is provided by the `maxContains` keyword

0 commit comments

Comments
 (0)