|
1394 | 1394 | <list>
|
1395 | 1395 | <t>
|
1396 | 1396 | "additionalProperties", whose behavior is defined in terms of
|
1397 |
| - "properties" and "patternProperties"; and |
| 1397 | + "properties" and "patternProperties" |
1398 | 1398 | </t>
|
1399 | 1399 | <t>
|
1400 |
| - "additionalItems", whose behavior is defined in terms of "items". |
| 1400 | + "unevaluatedProperties", whose behavior is defined in terms of |
| 1401 | + annotations from "properties", "patternProperties", |
| 1402 | + "additionalProperties" and itself |
| 1403 | + </t> |
| 1404 | + <t> |
| 1405 | + "additionalItems", whose behavior is defined in terms of "items" |
| 1406 | + </t> |
| 1407 | + <t> |
| 1408 | + "unevaluatedItems", whose behavior is defined in terms of annotations |
| 1409 | + from "items", "additionalItems" and itself |
1401 | 1410 | </t>
|
1402 | 1411 | </list>
|
1403 | 1412 | </t>
|
1404 | 1413 | </section>
|
1405 | 1414 |
|
1406 |
| - <section title="Keywords for Applying Subschemas in Place"> |
| 1415 | + <section title="Keywords for Applying Subschemas in Place" anchor="in-place"> |
1407 | 1416 | <t>
|
1408 | 1417 | These keywords apply subschemas to the same location in the instance
|
1409 | 1418 | as the parent schema is being applied. They allow combining
|
|
1641 | 1650 | </t>
|
1642 | 1651 | </section>
|
1643 | 1652 |
|
| 1653 | + <section title="unevaluatedItems" anchor="unevaluatedItems"> |
| 1654 | + <t> |
| 1655 | + The value of "unevaluatedItems" MUST be a valid JSON Schema. |
| 1656 | + </t> |
| 1657 | + <t> |
| 1658 | + The behavior of this keyword depends on the annotation results of |
| 1659 | + adjacent keywords that apply to the instance location being validated. |
| 1660 | + Specifically, the annotations from "items" and "additionalItems", |
| 1661 | + which can come from those keywords when they are adjacent to the |
| 1662 | + "unevaluatedItems" keyword. Those two annotations, as well as |
| 1663 | + "unevaluatedItems", can also result from any and all adjacent |
| 1664 | + <xref target="in-place">in-place applicator</xref> keywords. |
| 1665 | + This includes but is not limited to the in-place applicators |
| 1666 | + defined in this document. |
| 1667 | + </t> |
| 1668 | + <t> |
| 1669 | + If an "items" annotation is present, and its annotation result |
| 1670 | + is a number, and no "additionalItems" or "unevaluatedItems" |
| 1671 | + annotation is present, then validation succeeds if every instance |
| 1672 | + element at an index greater than the "items" annotation validates |
| 1673 | + against "unevaluatedItems". |
| 1674 | + </t> |
| 1675 | + <t> |
| 1676 | + Otherwise, if any "items", "additionalItems", or "unevaluatedItems" |
| 1677 | + annotations are present with a value of boolean true, then |
| 1678 | + "unevaluatedItems" MUST be ignored. However, if none of these |
| 1679 | + annotations are present, "unevaluatedItems" MUST be applied to |
| 1680 | + all locations in the array. |
| 1681 | + </t> |
| 1682 | + <t> |
| 1683 | + This means that "items", "additionalItems", and all in-place applicators |
| 1684 | + MUST be evaluated before this keyword can be evaluated. Authors of |
| 1685 | + extension keywords MUST NOT define an in-place applicator that would need |
| 1686 | + to be evaluated before this keyword. |
| 1687 | + </t> |
| 1688 | + <t> |
| 1689 | + If the "unevaluatedItems" subschema is applied to any |
| 1690 | + positions within the instance array, it produces an |
| 1691 | + annotation result of boolean true, analogous to the |
| 1692 | + single schema behavior of "items". If any "unevaluatedItems" |
| 1693 | + keyword from any subschema applied to the same instance |
| 1694 | + location produces an annotation value of true, then |
| 1695 | + the combined result from these keywords is also true. |
| 1696 | + </t> |
| 1697 | + <t> |
| 1698 | + Omitting this keyword has the same assertion behavior as |
| 1699 | + an empty schema. |
| 1700 | + </t> |
| 1701 | + <t> |
| 1702 | + Implementations that do not collect annotations MUST raise an error |
| 1703 | + upon encountering this keyword. |
| 1704 | + </t> |
| 1705 | + </section> |
| 1706 | + |
1644 | 1707 | <section title="contains">
|
1645 | 1708 | <t>
|
1646 | 1709 | The value of this keyword MUST be a valid JSON Schema.
|
|
1740 | 1803 | an empty schema.
|
1741 | 1804 | </t>
|
1742 | 1805 | <t>
|
1743 |
| - Implementation MAY choose to implement or optimize this keyword |
| 1806 | + Implementations MAY choose to implement or optimize this keyword |
1744 | 1807 | in another way that produces the same effect, such as by directly
|
1745 | 1808 | checking the names in "properties" and the patterns in
|
1746 | 1809 | "patternProperties" against the instance property set.
|
1747 | 1810 | Implementations that do not support annotation collection MUST do so.
|
1748 | 1811 | </t>
|
1749 | 1812 | </section>
|
1750 | 1813 |
|
| 1814 | + <section title="unevaluatedProperties" anchor="unevaluatedProperties"> |
| 1815 | + <t> |
| 1816 | + The value of "unevaluatedProperties" MUST be a valid JSON Schema. |
| 1817 | + </t> |
| 1818 | + <t> |
| 1819 | + The behavior of this keyword depends on the annotation results of |
| 1820 | + adjacent keywords that apply to the instance location being validated. |
| 1821 | + Specifically, the annotations from "properties", "patternProperties", |
| 1822 | + and "additionalProperties", which can come from those keywords when |
| 1823 | + they are adjacent to the "unevaluatedProperties" keyword. Those |
| 1824 | + three annotations, as well as "unevaluatedProperties", can also |
| 1825 | + result from any and all adjacent |
| 1826 | + <xref target="in-place">in-place applicator</xref> keywords. |
| 1827 | + This includes but is not limited to the in-place applicators |
| 1828 | + defined in this document. |
| 1829 | + </t> |
| 1830 | + <t> |
| 1831 | + Validation with "unevaluatedProperties" applies only to the child |
| 1832 | + values of instance names that do not appear in the "properties", |
| 1833 | + "patternProperties", "additionalProperties", or |
| 1834 | + "unevaluatedProperties" annotation results that apply to the |
| 1835 | + instance location being validated. |
| 1836 | + </t> |
| 1837 | + <t> |
| 1838 | + For all such properties, validation succeeds if the child instance |
| 1839 | + validates against the "unevaluatedProperties" schema. |
| 1840 | + </t> |
| 1841 | + <t> |
| 1842 | + This means that "properties", "patternProperties", "additionalProperties", |
| 1843 | + and all in-place applicators MUST be evaluated before this keyword can |
| 1844 | + be evaluated. Authors of extension keywords MUST NOT define an in-place |
| 1845 | + applicator that would need to be evaluated before this keyword. |
| 1846 | + </t> |
| 1847 | + <t> |
| 1848 | + The annotation result of this keyword is the set of instance |
| 1849 | + property names validated by this keyword's subschema. |
| 1850 | + Annotation results for "unevaluatedProperties" keywords from |
| 1851 | + multiple schemas applied to the same instance location are combined |
| 1852 | + by taking the union of the sets. |
| 1853 | + </t> |
| 1854 | + <t> |
| 1855 | + Omitting this keyword has the same assertion behavior as |
| 1856 | + an empty schema. |
| 1857 | + </t> |
| 1858 | + <t> |
| 1859 | + Implementations that do not collect annotations MUST raise an error |
| 1860 | + upon encountering this keyword. |
| 1861 | + </t> |
| 1862 | + </section> |
| 1863 | + |
1751 | 1864 | <section title="propertyNames">
|
1752 | 1865 | <t>
|
1753 | 1866 | The value of "propertyNames" MUST be a valid JSON Schema.
|
|
0 commit comments