Skip to content

Commit 558e11f

Browse files
committed
Hyper-schema: Remove the page-long section on multiple links
1 parent 180399b commit 558e11f

File tree

1 file changed

+7
-59
lines changed

1 file changed

+7
-59
lines changed

jsonschema-hyperschema.xml

Lines changed: 7 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -263,69 +263,16 @@
263263
}]]>
264264
</artwork>
265265
</figure>
266-
267-
<section title="Multiple links per URI">
268-
<t>
269-
A single URI might have more than one role with relation to an instance. This is not a problem - the same URI can be used in more than one Link Description Object.
270-
</t>
271-
<figure>
272-
<preamble>
273-
For example, this schema describes a format for blog posts, accessed via HTTP.
274-
The links describe how to access the comments for the post,
275-
how to search the comments, all with the same URI:</preamble>
276-
<artwork>
277-
<![CDATA[{
278-
"title": "News post",
279-
...
280-
"links": [
281-
{
282-
"rel": "comments",
283-
"href": "/{id}/comments"
284-
},
285-
{
286-
"rel": "search",
287-
"href": "/{id}/comments",
288-
"method": "get",
289-
"schema": {
290-
"type": "object",
291-
"properties": {
292-
"searchTerm": {
293-
"type": "string"
294-
},
295-
"itemsPerPage": {
296-
"type": "integer",
297-
"minimum": 10,
298-
"multipleOf": 10,
299-
"default": 20
300-
}
301-
},
302-
"required": ["searchTerm"]
303-
}
304-
}
305-
]
306-
}]]>
307-
</artwork>
308-
</figure>
309-
<t>
310-
If the client follows the first link, the URI might be expanded to "/15/comments".
311-
For the second link, the method is "GET" (the default for HTTP) so a client following this link would add the parameters to the URL to produce something like: "/15/comments?searchTerm=JSON&amp;itemsPerPage=50".
312-
</t>
313-
<figure>
314-
<artwork>
315-
<![CDATA[{
316-
"message": "This is an example comment"
317-
}]]>
318-
</artwork>
319-
</figure>
320-
</section>
321266
</section>
322267

323268
<section title="media">
324269
<t>
325-
The "media" property indicates that this instance contains non-JSON data encoded in a JSON string. It describes the type of content and how it is encoded.
270+
The "media" property indicates that this instance contains non-JSON data encoded in a JSON string.
271+
It describes the type of content and how it is encoded.
326272
</t>
327273
<t>
328-
The value of this property MUST be an object. The value of this property SHOULD be ignored if the instance described is not a string.
274+
The value of this property MUST be an object.
275+
The value of this property SHOULD be ignored if the instance described is not a string.
329276
</t>
330277

331278
<section title="Properties of &quot;media&quot;">
@@ -420,8 +367,9 @@
420367
The value of the "href" link description property is a template used to determine the target URI of the related resource.
421368
The value of the instance property MUST be resolved as a <xref target="RFC3986">URI-reference</xref> against the base URI of the instance.
422369
</t>
423-
424-
<t>This property is REQUIRED.</t>
370+
<t>
371+
This property is REQUIRED.
372+
</t>
425373

426374
<section title="URI Templating">
427375
<t>

0 commit comments

Comments
 (0)