Skip to content

Commit b01c13a

Browse files
committed
Rename some href* keywords to template*
Addresses part of #416. Since "href", "anchor", and "base" all share the use of "hrefPointers" and "hrefRequired", let's call them something more generic. Note that since "hrefSchema" is NOT used with "anchor", it retains its existing name.
1 parent 9a1d8ed commit b01c13a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

jsonschema-hyperschema.xml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@
360360
sub-instance that validated against the schema containing the LDO.
361361
</t>
362362
<t>
363-
<xref target="hrefPointers">"hrefPointers"</xref> allows adjusting
363+
<xref target="templatePointers">"templatePointers"</xref> allows adjusting
364364
the location from which instance data is resolved on a per-variable
365365
basis.
366366
</t>
@@ -550,18 +550,18 @@
550550
express a requirement for those variables that can be supplied via input,
551551
some variables must be resolved from instance data. When that instance
552552
data is not required by the context schema, the
553-
<xref target="hrefRequired">"hrefRequired</xref> keyword may be used to
554-
indicate that when the instance data is not available, the link does
555-
not apply.
553+
<xref target="templateRequired">"templateRequired</xref> keyword may
554+
be used to indicate that when the instance data is not available, the
555+
link does not apply.
556556
</t>
557557
</section>
558558
</section>
559559

560560
</section>
561561

562-
<section title="hrefPointers" anchor="hrefPointers">
562+
<section title="templatePointers" anchor="templatePointers">
563563
<t>
564-
The value of the "hrefPointers" link description property MUST be
564+
The value of the "templatePointers" link description property MUST be
565565
an object. Each property value in the object MUST be a valid
566566
<xref target="RFC6901">JSON Pointer</xref>, or a valid
567567
<xref target="I-D.luff-relative-json-pointer">Relative JSON Pointer</xref>
@@ -596,26 +596,26 @@
596596
{
597597
"rel": "self",
598598
"href": "/trees/{rootId}/nodes/{id}",
599-
"hrefPointers": {
599+
"templatePointers": {
600600
"rootId": "/id"
601601
}
602602
},
603603
{
604604
"rel": "up",
605605
"href": "/trees/{rootId}/nodes/{parentId}",
606-
"hrefPointers": {
606+
"templatePointers": {
607607
"rootId": "/id",
608608
"parentId": "2/id"
609609
},
610-
"hrefRequired": ["parentId"]
610+
"templateRequired": ["parentId"]
611611
}
612612
]
613613
}]]>
614614
</artwork>
615615
</figure>
616616
<t>
617617
In "self" link, the context node's id resolves with the standard process and
618-
therefore does not appear in "hrefPointers". In both "self" and "up" links,
618+
therefore does not appear in "templatePointers". In both "self" and "up" links,
619619
the root id is located using an absolute JSON Pointer. Finally, in "up" link,
620620
the parent node uses a Relative JSON Pointer, going up two levels (one level up
621621
is the array of children, two levels up is the whole parent node), and then
@@ -659,7 +659,7 @@
659659
</t>
660660
<t>
661661
For the root node, the relative pointer for the parent doesn't point
662-
to anything, so <xref target="hrefRequired">"hrefRequired"</xref>
662+
to anything, so <xref target="templateRequired">"templateRequired"</xref>
663663
prevents the link from being used with that node.
664664
</t>
665665
</section>
@@ -755,7 +755,7 @@
755755
</t>
756756
</section>
757757

758-
<section title="hrefRequired" anchor="hrefRequired">
758+
<section title="templateRequired" anchor="templateRequired">
759759
<t>
760760
The value of this keyword MUST be an array, and the elements MUST be unique.
761761
Each element SHOULD match a variable in the link's URI Template, without
@@ -766,21 +766,21 @@
766766
<figure>
767767
<preamble>
768768
Here is a simplified version of the "up" link from the
769-
<xref target="hrefPointers">"hrefPointers</xref> tree example,
769+
<xref target="templatePointers">"templatePointers</xref> tree example,
770770
modified to only use the parent identifier for its "href" template.
771771
While each individual node is required to have an "id" field, the
772772
"up" link uses the parent node's field, and the root node, by definition,
773-
does not have a parent node. Putting "parentId" in "hrefRequired" ensures
774-
that the "up" link is correctly unusable with the root node.
773+
does not have a parent node. Putting "parentId" in "templateRequired"
774+
ensures that the "up" link is correctly unusable with the root node.
775775
</preamble>
776776
<artwork>
777777
<![CDATA[{
778778
"rel": "up",
779779
"href": "/nodes/{parentId}",
780-
"hrefPointers": {
780+
"templatePointers": {
781781
"parentId": "2/id"
782782
},
783-
"hrefRequired": ["parentId"]
783+
"templateRequired": ["parentId"]
784784
}]]>
785785
</artwork>
786786
</figure>

0 commit comments

Comments
 (0)