|
314 | 314 | <t> |
315 | 315 | Object properties that are applied to the instance are called keywords, |
316 | 316 | or schema keywords. Broadly speaking, keywords fall into one |
317 | | - of four categories: |
| 317 | + of five categories: |
318 | 318 | <list style="hanging"> |
319 | 319 | <t hangText="identifiers:"> |
320 | 320 | control schema identification through setting the schema's |
|
1697 | 1697 | <artwork> |
1698 | 1698 | <![CDATA[ |
1699 | 1699 | { |
1700 | | -"$id": "https://example.net/root.json", |
1701 | | -"items": { |
1702 | | -"type": "array", |
1703 | | -"items": { "$ref": "#item" } |
1704 | | -}, |
1705 | | -"$defs": { |
1706 | | -"single": { |
1707 | | - "$anchor": "item", |
1708 | | - "type": "object", |
1709 | | - "additionalProperties": { "$ref": "other.json" } |
1710 | | -} |
1711 | | -} |
| 1700 | + "$id": "https://example.net/root.json", |
| 1701 | + "items": { |
| 1702 | + "type": "array", |
| 1703 | + "items": { "$ref": "#item" } |
| 1704 | + }, |
| 1705 | + "$defs": { |
| 1706 | + "single": { |
| 1707 | + "$anchor": "item", |
| 1708 | + "type": "object", |
| 1709 | + "additionalProperties": { "$ref": "other.json" } |
| 1710 | + } |
| 1711 | + } |
1712 | 1712 | } |
1713 | 1713 | ]]> |
1714 | 1714 | </artwork> |
1715 | 1715 | </figure> |
1716 | 1716 | <t> |
1717 | 1717 | When an implementation encounters the <#/$defs/single> schema, |
1718 | | - it resolves the "$id" URI reference against the current base URI to form |
1719 | | - <https://example.net/root.json#item>. |
| 1718 | + it resolves the "$anchor" value as a fragment name against the current |
| 1719 | + base URI to form <https://example.net/root.json#item>. |
1720 | 1720 | </t> |
1721 | 1721 | <t> |
1722 | 1722 | When an implementation then looks inside the <#/items> schema, it |
|
1769 | 1769 | <artwork> |
1770 | 1770 | <![CDATA[ |
1771 | 1771 | { |
1772 | | - "$id": "https://example.com/foo", |
1773 | | - "items": { |
1774 | | -"$id": "https://example.com/bar", |
1775 | | -"additionalProperties": { } |
1776 | | - } |
| 1772 | + "$id": "https://example.com/foo", |
| 1773 | + "items": { |
| 1774 | + "$id": "https://example.com/bar", |
| 1775 | + "additionalProperties": { } |
| 1776 | + } |
1777 | 1777 | } |
1778 | 1778 | ]]> |
1779 | 1779 | </artwork> |
|
1792 | 1792 | <artwork> |
1793 | 1793 | <![CDATA[ |
1794 | 1794 | { |
1795 | | - "$id": "https://example.com/foo", |
1796 | | - "items": { |
1797 | | -"$ref": "bar" |
1798 | | - } |
| 1795 | + "$id": "https://example.com/foo", |
| 1796 | + "items": { |
| 1797 | + "$ref": "bar" |
| 1798 | + } |
1799 | 1799 | } |
1800 | 1800 |
|
1801 | 1801 | { |
1802 | | - "$id": "https://example.com/bar", |
1803 | | - "additionalProperties": { } |
| 1802 | + "$id": "https://example.com/bar", |
| 1803 | + "additionalProperties": { } |
1804 | 1804 | } |
1805 | 1805 | ]]> |
1806 | 1806 | </artwork> |
|
0 commit comments