|
263 | 263 | }]]>
|
264 | 264 | </artwork>
|
265 | 265 | </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&itemsPerPage=50". |
312 |
| - </t> |
313 |
| - <figure> |
314 |
| - <artwork> |
315 |
| -<![CDATA[{ |
316 |
| - "message": "This is an example comment" |
317 |
| -}]]> |
318 |
| - </artwork> |
319 |
| - </figure> |
320 |
| - </section> |
321 | 266 | </section>
|
322 | 267 |
|
323 | 268 | <section title="media">
|
324 | 269 | <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. |
326 | 272 | </t>
|
327 | 273 | <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. |
329 | 276 | </t>
|
330 | 277 |
|
331 | 278 | <section title="Properties of "media"">
|
|
420 | 367 | The value of the "href" link description property is a template used to determine the target URI of the related resource.
|
421 | 368 | The value of the instance property MUST be resolved as a <xref target="RFC3986">URI-reference</xref> against the base URI of the instance.
|
422 | 369 | </t>
|
423 |
| - |
424 |
| - <t>This property is REQUIRED.</t> |
| 370 | + <t> |
| 371 | + This property is REQUIRED. |
| 372 | + </t> |
425 | 373 |
|
426 | 374 | <section title="URI Templating">
|
427 | 375 | <t>
|
|
0 commit comments