@@ -1645,27 +1645,23 @@ and the instance value are affected by this keyword.
1645
1645
This keyword produces an annotation value which is the largest index to which
1646
1646
this keyword applied a subschema. The value MAY be a boolean true if a subschema
1647
1647
was applied to every index of the instance, such as is produced by the ` items `
1648
- keyword. This annotation affects the behavior of ` items ` and ` unevaluatedItems ` .
1648
+ keyword.
1649
+
1650
+ The presence of this keyword affects the behaviors of [ ` items ` ] ( #items ) and
1651
+ [ ` unevaluatedItems ` ] ( #unevaluateditems ) .
1649
1652
1650
1653
##### ` items ` {#items}
1651
1654
1652
1655
The value of ` items ` MUST be a valid JSON Schema.
1653
1656
1654
- This keyword applies its subschema to all instance elements at indexes greater
1655
- than the length of the ` prefixItems ` array in the same schema object, as
1656
- reported by the annotation result of that ` prefixItems ` keyword. If no such
1657
- annotation result exists, ` items ` applies its subschema to all instance array
1658
- elements.[ ^ 11 ]
1659
-
1660
- [ ^ 11 ] : Note that the behavior of ` items ` without ` prefixItems ` is identical to
1661
- that of the schema form of ` items ` in prior drafts. When ` prefixItems ` is
1662
- present, the behavior of ` items ` is identical to the former ` additionalItems `
1663
- keyword.
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.
1664
1661
1665
1662
If the ` items ` subschema is applied to any positions within the instance array,
1666
1663
it produces an annotation result of boolean true, indicating that all remaining
1667
- array elements have been evaluated against this keyword's subschema. This
1668
- annotation affects the behavior of ` unevaluatedItems ` .
1664
+ array elements have been evaluated against this keyword's subschema.
1669
1665
1670
1666
Omitting this keyword has the same assertion behavior as an empty schema.
1671
1667
@@ -1674,6 +1670,9 @@ that produces the same effect, such as by directly checking for the presence and
1674
1670
size of a ` prefixItems ` array. Implementations that do not support annotation
1675
1671
collection MUST do so.
1676
1672
1673
+ The presence of this keyword affects the behavior of
1674
+ [ ` unevaluatedItems ` ] ( #unevaluateditems ) .
1675
+
1677
1676
#### Keywords for Applying Subschemas to Objects
1678
1677
1679
1678
##### ` properties `
@@ -1685,11 +1684,13 @@ Validation succeeds if, for each name that appears in both the instance and as a
1685
1684
name within this keyword's value, the child instance for that name successfully
1686
1685
validates against the corresponding schema.
1687
1686
1687
+ Omitting this keyword has the same assertion behavior as an empty object.
1688
+
1688
1689
The annotation result of this keyword is the set of instance property names
1689
- which are also present under this keyword. This annotation affects the behavior
1690
- of ` additionalProperties ` and ` unevaluatedProperties ` .
1690
+ which are also present under this keyword.
1691
1691
1692
- Omitting this keyword has the same assertion behavior as an empty object.
1692
+ The presence of this keyword affects the behavior of
1693
+ [ ` additionalProperties ` (#additionalProperties) and [ ` unevaluatedProperties ` ] ( #unevaluatedproperties ) .
1693
1694
1694
1695
##### ` patternProperties `
1695
1696
@@ -1704,11 +1705,13 @@ instance for that name successfully validates against each schema that
1704
1705
corresponds to a matching regular expression. Recall: regular expressions are
1705
1706
not implicitly anchored.
1706
1707
1708
+ Omitting this keyword has the same assertion behavior as an empty object.
1709
+
1707
1710
The annotation result of this keyword is the set of instance property names
1708
- matched by at least one property under this keyword. This annotation affects the
1709
- behavior of ` additionalProperties ` and ` unevaluatedProperties ` .
1711
+ matched by at least one property under this keyword.
1710
1712
1711
- Omitting this keyword has the same assertion behavior as an empty object.
1713
+ The presence of this keyword affects the behavior of
1714
+ [ ` additionalProperties ` (#additionalproperties) and [ ` unevaluatedProperties ` ] ( #unevaluatedproperties ) .
1712
1715
1713
1716
##### ` additionalProperties ` {#additionalproperties}
1714
1717
@@ -1723,26 +1726,13 @@ that do not appear in the annotation results of either `properties` or
1723
1726
For all such properties, validation succeeds if the child instance validates
1724
1727
against the ` additionalProperties ` schema.
1725
1728
1726
- The annotation result of this keyword is the set of instance property names
1727
- validated by this keyword's subschema. This annotation affects the behavior of
1728
- ` unevaluatedProperties ` .
1729
-
1730
1729
Omitting this keyword has the same assertion behavior as an empty schema.
1731
1730
1732
- Implementations MAY choose to implement or optimize this keyword in another way
1733
- that produces the same effect, such as by directly checking the names in
1734
- ` properties ` and the patterns in ` patternProperties ` against the instance
1735
- property set. Implementations that do not support annotation collection MUST do
1736
- so.[ ^ 12 ]
1737
-
1738
- [ ^ 12 ] : In defining this option, it seems there is the potential for ambiguity in
1739
- the output format. The ambiguity does not affect validation results, but it does
1740
- affect the resulting output format. The ambiguity allows for multiple valid
1741
- output results depending on whether annotations are used or a solution that
1742
- "produces the same effect" as draft-07. It is understood that annotations from
1743
- failing schemas are dropped. See our [ Decision
1744
- Record] ( https://github.com/json-schema-org/json-schema-spec/tree/HEAD/adr/2022-04-08-cref-for-ambiguity-and-fix-later-gh-spec-issue-1172.md )
1745
- for further details.
1731
+ The annotation result of this keyword is the set of instance property names
1732
+ validated by this keyword's subschema.
1733
+
1734
+ The presence of this keyword affects the behavior of
1735
+ [ ` unevaluatedProperties ` ] ( #unevaluatedproperties ) .
1746
1736
1747
1737
##### ` propertyNames `
1748
1738
0 commit comments