Skip to content

Commit 53a3776

Browse files
committed
Fix typos and copy-paste example errors.
1 parent 8862129 commit 53a3776

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

hyper-schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"format": "uri-template"
2323
},
2424
"hrefPointers": {
25-
"description": "a map of variable names to relative instance JSON Pointers, which adjust the instance location from which template variable resolution begins",
25+
"description": "a map of variable names to relative instance JSON Pointers, which adjust the instance location from which template variable resolution begins"
26+
},
2627
"hrefSchema": {
2728
"description": "a schema for validating user input to the URI template, where the input is in the form of a JSON object with property names matching variable names in \"href\"",
2829
"allOf": [ {"$ref": "#"} ]

jsonschema-hyperschema.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@
669669
<xref target="I-D.luff-relative-json-pointer">Relative JSON Pointer</xref>,
670670
which is evaluated relative to the position in the instance from which
671671
<xref target="href">"href"</xref> template variable resolution would
672-
normolly begin.
672+
normally begin.
673673
</t>
674674
<t>
675675
For each property name in the object that matches a variable name in the
@@ -695,6 +695,9 @@
695695
"rel": "self",
696696
"href": "/trees{/root,parent,id}"
697697
"hrefPointers": {
698+
"root": "/id",
699+
"parent": "2/id"
700+
}
698701
}
699702
]
700703
}]]>
@@ -703,6 +706,11 @@
703706
The self links here should always include the root node id,
704707
followed by an immediate parent id if one exists, and always ending
705708
with the id of the node that is the context of the self link.
709+
The context node's id resolves with the standard process and
710+
does not appear in "hrefPointers". The root id is located
711+
using an absolute JSON Pointer, while the parent node
712+
uses a Relative JSON Pointer, going up two levels (one level up
713+
is the array of children, two levels up is the whole parent node).
706714
</postamble>
707715
</figure>
708716
<figure>
@@ -728,9 +736,8 @@
728736
<t hangText='"" (the root node)'>/trees/0/0</t>
729737
<t hangText='"/children/0/children/0"'>/trees/0/0/1</t>
730738
<t hangText='"/children/0/children/0/children/0"'>/trees/0/1/2</t>
731-
<t hangText='"/children/0/children/0/children/0/children/0"'>/trees/2/3</t>
739+
<t hangText='"/children/0/children/0/children/0/children/0"'>/trees/0/2/3</t>
732740
</list>
733-
omitted, giving us the desired URI with two components after "/trees". The
734741
This shows the use of an absolute JSON Pointer to always resolve
735742
the root node from any depth, and a Relative JSON Pointer to always resolve
736743
the immediate parent, which cannot be identified with an absolute pointer.

0 commit comments

Comments
 (0)