Skip to content

Commit 5340c4b

Browse files
authored
Merge pull request json-schema-org#138 from handrews/bugfix
Fix parent link example. Fixes json-schema-org#97
2 parents d0391a9 + 7ea13d8 commit 5340c4b

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

jsonschema-hyperschema.xml

+14-11
Original file line numberDiff line numberDiff line change
@@ -514,16 +514,19 @@
514514
</t>
515515

516516
<figure>
517-
<preamble>For example, if a schema is defined:</preamble>
517+
<preamble>For example, if a hyper-schema is defined:</preamble>
518518
<artwork>
519519
<![CDATA[{
520-
"links": [{
521-
"rel": "self",
522-
"href": "{id}"
523-
}, {
524-
"rel": "up",
525-
"href": "{upId}"
526-
}]
520+
"type": "array",
521+
"items": {
522+
"links": [{
523+
"rel": "item",
524+
"href": "{id}"
525+
}, {
526+
"rel": "up",
527+
"href": "{upId}"
528+
}]
529+
}
527530
}]]>
528531
</artwork>
529532
</figure>
@@ -542,7 +545,7 @@
542545
}]]]>
543546
</artwork>
544547
<postamble>
545-
This would indicate that for the first item in the collection, its own (self) URI would resolve to "/Resource/thing" and the first item's "up" relation SHOULD be resolved to the resource at "/Resource/parent".
548+
This would indicate that for the first item in the collection, its URI as its own resource would resolve to "/Resource/thing" and the first item's "up" relation SHOULD be resolved to the resource at "/Resource/parent".
546549
</postamble>
547550
</figure>
548551

@@ -552,10 +555,10 @@
552555

553556
<section title="Security Considerations for &quot;self&quot; links">
554557
<t>
555-
When link relation of "self" is used to denote a full representation of an object, the user agent SHOULD NOT consider the representation to be the authoritative representation of the resource denoted by the target URI if the target URI is not equivalent to or a sub-path of the the URI used to request the resource representation which contains the target URI with the "self" link.
558+
When link relation of "self" is used to denote a full representation of an object, the user agent SHOULD NOT consider the representation to be the authoritative representation of the resource denoted by the target URI if the target URI is not equivalent to or a sub-path of the URI used to request the resource representation which contains the target URI with the "self" link.
556559

557560
<figure>
558-
<preamble>For example, if a hyper schema was defined:</preamble>
561+
<preamble>For example, if a hyper-schema was defined:</preamble>
559562
<artwork>
560563
<![CDATA[{
561564
"links": [{

0 commit comments

Comments
 (0)