Skip to content

Commit 7be79b4

Browse files
authored
Merge pull request #420 from handrews/template-not-href
Rename some href* keywords to template*
2 parents 6624c1a + 884b964 commit 7be79b4

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

jsonschema-hyperschema.xml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@
361361
sub-instance that validated against the schema containing the LDO.
362362
</t>
363363
<t>
364-
<xref target="hrefPointers">"hrefPointers"</xref> allows adjusting
364+
<xref target="templatePointers">"templatePointers"</xref> allows adjusting
365365
the location from which instance data is resolved on a per-variable
366366
basis.
367367
</t>
@@ -551,18 +551,18 @@
551551
express a requirement for those variables that can be supplied via input,
552552
some variables must be resolved from instance data. When that instance
553553
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.
557557
</t>
558558
</section>
559559
</section>
560560

561561
</section>
562562

563-
<section title="hrefPointers" anchor="hrefPointers">
563+
<section title="templatePointers" anchor="templatePointers">
564564
<t>
565-
The value of the "hrefPointers" link description property MUST be
565+
The value of the "templatePointers" link description property MUST be
566566
an object. Each property value in the object MUST be a valid
567567
<xref target="RFC6901">JSON Pointer</xref>, or a valid
568568
<xref target="I-D.luff-relative-json-pointer">Relative JSON Pointer</xref>
@@ -597,26 +597,26 @@
597597
{
598598
"rel": "self",
599599
"href": "/trees/{rootId}/nodes/{id}",
600-
"hrefPointers": {
600+
"templatePointers": {
601601
"rootId": "/id"
602602
}
603603
},
604604
{
605605
"rel": "up",
606606
"href": "/trees/{rootId}/nodes/{parentId}",
607-
"hrefPointers": {
607+
"templatePointers": {
608608
"rootId": "/id",
609609
"parentId": "2/id"
610610
},
611-
"hrefRequired": ["parentId"]
611+
"templateRequired": ["parentId"]
612612
}
613613
]
614614
}]]>
615615
</artwork>
616616
</figure>
617617
<t>
618618
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,
620620
the root id is located using an absolute JSON Pointer. Finally, in "up" link,
621621
the parent node uses a Relative JSON Pointer, going up two levels (one level up
622622
is the array of children, two levels up is the whole parent node), and then
@@ -660,7 +660,7 @@
660660
</t>
661661
<t>
662662
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>
664664
prevents the link from being used with that node.
665665
</t>
666666
</section>
@@ -756,7 +756,7 @@
756756
</t>
757757
</section>
758758

759-
<section title="hrefRequired" anchor="hrefRequired">
759+
<section title="templateRequired" anchor="templateRequired">
760760
<t>
761761
The value of this keyword MUST be an array, and the elements MUST be unique.
762762
Each element SHOULD match a variable in the link's URI Template, without
@@ -767,21 +767,21 @@
767767
<figure>
768768
<preamble>
769769
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,
771771
modified to only use the parent identifier for its "href" template.
772772
While each individual node is required to have an "id" field, the
773773
"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.
776776
</preamble>
777777
<artwork>
778778
<![CDATA[{
779779
"rel": "up",
780780
"href": "/nodes/{parentId}",
781-
"hrefPointers": {
781+
"templatePointers": {
782782
"parentId": "2/id"
783783
},
784-
"hrefRequired": ["parentId"]
784+
"templateRequired": ["parentId"]
785785
}]]>
786786
</artwork>
787787
</figure>

links.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "string",
1010
"format": "uri-template"
1111
},
12-
"hrefPointers": {
12+
"templatePointers": {
1313
"type": "object",
1414
"additionalProperties": {
1515
"type": "string",
@@ -24,7 +24,7 @@
2424
{ "$ref": "http://json-schema.org/draft-06/hyper-schema#" }
2525
]
2626
},
27-
"hrefRequired": {
27+
"templateRequired": {
2828
"type": "array",
2929
"items": {
3030
"type": "string"

0 commit comments

Comments
 (0)