|
1510 | 1510 | <t> |
1511 | 1511 | Together with "$dynamicAnchor", "$dynamicRef" implements a cooperative |
1512 | 1512 | extension mechanism that is primarily useful with recursive schemas |
1513 | | - (schemas that reference themselves). Both the extension point and the |
1514 | | - runtime-determined extension target are defined with "$dynamicAnchor", |
1515 | | - and only exhibit runtime dynamic behavior when referenced with |
1516 | | - "$dynamicRef". |
| 1513 | + (schemas that reference themselves). The extension point is defined with |
| 1514 | + "$dynamicAnchor" and only exhibits runtime dynamic behavior when referenced |
| 1515 | + with "$dynamicRef". |
1517 | 1516 | </t> |
1518 | 1517 | <t> |
1519 | | - The value of the "$dynamicRef" property MUST be a string which is |
1520 | | - a IRI-Reference. Resolved against the current IRI base, it produces |
1521 | | - the IRI used as the starting point for runtime resolution. This initial |
1522 | | - resolution is safe to perform on schema load. |
| 1518 | + The value of the "$dynamicRef" property MUST be a string which is a |
| 1519 | + IRI-Reference that contains a valid <xref target="anchor">plain name |
| 1520 | + fragment</xref>. Resolved against the current IRI base, it indicates |
| 1521 | + the schema resource used as the starting point for runtime resolution. |
| 1522 | + This initial resolution is safe to perform on schema load. |
1523 | 1523 | </t> |
1524 | 1524 | <t> |
1525 | | - If the initially resolved starting point IRI includes a fragment that |
1526 | | - was created by the "$dynamicAnchor" keyword, the initial IRI MUST be |
1527 | | - replaced by the IRI (including the fragment) for the outermost schema |
1528 | | - resource in the <xref target="scopes">dynamic scope</xref> that defines |
1529 | | - an identically named fragment with "$dynamicAnchor". |
1530 | | - </t> |
1531 | | - <t> |
1532 | | - Otherwise, its behavior is identical to "$ref", and no runtime |
1533 | | - resolution is needed. |
| 1525 | + The schema to apply is the outermost schema resource in the |
| 1526 | + <xref target="scopes">dynamic scope</xref> that defines a |
| 1527 | + "$dynamicAnchor" that matches the plain name fragment in the initially |
| 1528 | + resolved IRI. |
1534 | 1529 | </t> |
1535 | 1530 | <t> |
1536 | 1531 | For a full example using these keyword, see appendix |
@@ -3904,6 +3899,7 @@ https://example.com/schemas/common#/$defs/count/minimum |
3904 | 3899 | <list style="symbols"> |
3905 | 3900 | <t>"contains" now applies to objects as well as arrays</t> |
3906 | 3901 | <t>Use IRIs instead of URIs</t> |
| 3902 | + <t>Remove bookending requirement for "$dynamicRef"</t> |
3907 | 3903 | </list> |
3908 | 3904 | </t> |
3909 | 3905 | <t hangText="draft-bhutton-json-schema-01"> |
|
0 commit comments