|
361 | 361 | sub-instance that validated against the schema containing the LDO.
|
362 | 362 | </t>
|
363 | 363 | <t>
|
364 |
| - <xref target="hrefPointers">"hrefPointers"</xref> allows adjusting |
| 364 | + <xref target="templatePointers">"templatePointers"</xref> allows adjusting |
365 | 365 | the location from which instance data is resolved on a per-variable
|
366 | 366 | basis.
|
367 | 367 | </t>
|
|
551 | 551 | express a requirement for those variables that can be supplied via input,
|
552 | 552 | some variables must be resolved from instance data. When that instance
|
553 | 553 | data is not required by the context schema, the
|
554 |
| - <xref target="hrefRequired">"hrefRequired</xref> keyword may be used to |
555 |
| - indicate that when the instance data is not available, the link does |
556 |
| - not apply. |
| 554 | + <xref target="templateRequired">"templateRequired</xref> keyword may |
| 555 | + be used to indicate that when the instance data is not available, the |
| 556 | + link does not apply. |
557 | 557 | </t>
|
558 | 558 | </section>
|
559 | 559 | </section>
|
560 | 560 |
|
561 | 561 | </section>
|
562 | 562 |
|
563 |
| - <section title="hrefPointers" anchor="hrefPointers"> |
| 563 | + <section title="templatePointers" anchor="templatePointers"> |
564 | 564 | <t>
|
565 |
| - The value of the "hrefPointers" link description property MUST be |
| 565 | + The value of the "templatePointers" link description property MUST be |
566 | 566 | an object. Each property value in the object MUST be a valid
|
567 | 567 | <xref target="RFC6901">JSON Pointer</xref>, or a valid
|
568 | 568 | <xref target="I-D.luff-relative-json-pointer">Relative JSON Pointer</xref>
|
|
597 | 597 | {
|
598 | 598 | "rel": "self",
|
599 | 599 | "href": "/trees/{rootId}/nodes/{id}",
|
600 |
| - "hrefPointers": { |
| 600 | + "templatePointers": { |
601 | 601 | "rootId": "/id"
|
602 | 602 | }
|
603 | 603 | },
|
604 | 604 | {
|
605 | 605 | "rel": "up",
|
606 | 606 | "href": "/trees/{rootId}/nodes/{parentId}",
|
607 |
| - "hrefPointers": { |
| 607 | + "templatePointers": { |
608 | 608 | "rootId": "/id",
|
609 | 609 | "parentId": "2/id"
|
610 | 610 | },
|
611 |
| - "hrefRequired": ["parentId"] |
| 611 | + "templateRequired": ["parentId"] |
612 | 612 | }
|
613 | 613 | ]
|
614 | 614 | }]]>
|
615 | 615 | </artwork>
|
616 | 616 | </figure>
|
617 | 617 | <t>
|
618 | 618 | In "self" link, the context node's id resolves with the standard process and
|
619 |
| - therefore does not appear in "hrefPointers". In both "self" and "up" links, |
| 619 | + therefore does not appear in "templatePointers". In both "self" and "up" links, |
620 | 620 | the root id is located using an absolute JSON Pointer. Finally, in "up" link,
|
621 | 621 | the parent node uses a Relative JSON Pointer, going up two levels (one level up
|
622 | 622 | is the array of children, two levels up is the whole parent node), and then
|
|
660 | 660 | </t>
|
661 | 661 | <t>
|
662 | 662 | For the root node, the relative pointer for the parent doesn't point
|
663 |
| - to anything, so <xref target="hrefRequired">"hrefRequired"</xref> |
| 663 | + to anything, so <xref target="templateRequired">"templateRequired"</xref> |
664 | 664 | prevents the link from being used with that node.
|
665 | 665 | </t>
|
666 | 666 | </section>
|
|
756 | 756 | </t>
|
757 | 757 | </section>
|
758 | 758 |
|
759 |
| - <section title="hrefRequired" anchor="hrefRequired"> |
| 759 | + <section title="templateRequired" anchor="templateRequired"> |
760 | 760 | <t>
|
761 | 761 | The value of this keyword MUST be an array, and the elements MUST be unique.
|
762 | 762 | Each element SHOULD match a variable in the link's URI Template, without
|
|
767 | 767 | <figure>
|
768 | 768 | <preamble>
|
769 | 769 | Here is a simplified version of the "up" link from the
|
770 |
| - <xref target="hrefPointers">"hrefPointers</xref> tree example, |
| 770 | + <xref target="templatePointers">"templatePointers</xref> tree example, |
771 | 771 | modified to only use the parent identifier for its "href" template.
|
772 | 772 | While each individual node is required to have an "id" field, the
|
773 | 773 | "up" link uses the parent node's field, and the root node, by definition,
|
774 |
| - does not have a parent node. Putting "parentId" in "hrefRequired" ensures |
775 |
| - that the "up" link is correctly unusable with the root node. |
| 774 | + does not have a parent node. Putting "parentId" in "templateRequired" |
| 775 | + ensures that the "up" link is correctly unusable with the root node. |
776 | 776 | </preamble>
|
777 | 777 | <artwork>
|
778 | 778 | <![CDATA[{
|
779 | 779 | "rel": "up",
|
780 | 780 | "href": "/nodes/{parentId}",
|
781 |
| - "hrefPointers": { |
| 781 | + "templatePointers": { |
782 | 782 | "parentId": "2/id"
|
783 | 783 | },
|
784 |
| - "hrefRequired": ["parentId"] |
| 784 | + "templateRequired": ["parentId"] |
785 | 785 | }]]>
|
786 | 786 | </artwork>
|
787 | 787 | </figure>
|
|
0 commit comments