@@ -1297,11 +1297,19 @@ for varname in templateData:
1297
1297
using protocols such as CoAP that are explicitly analogous to HTTP.
1298
1298
</t >
1299
1299
<t >
1300
- This section provides guidance on how to define links for use with each
1301
- common HTTP method, and how collection resources impose additional constraints
1302
- on the use of HTTP POST. Additionally, guidance is provided on hinting at
1303
- HTTP response header values and describing possible HTTP request headers
1304
- that are relevant to the given resource.
1300
+ This section provides guidance on how to use each common HTTP method with a link,
1301
+ and how colletion resources impose additional constraints on HTTP POST.
1302
+ Additionally, guidance is provided on hinting at HTTP response header values and
1303
+ describing possible HTTP request headers that are relevant to the given resource.
1304
+ </t >
1305
+ <t >
1306
+ <xref target =" json-schema" >Section 11 of the JSON Schema core specification</xref >
1307
+ provides guidance on linking instances in a hypermedia system to their schemas.
1308
+ This may be done with network-accessible schemas, or may simply identify schemas
1309
+ which were pre-packaged within the client application. JSON Hyper-Schema
1310
+ intentionally does not constrain this mechanism, although it is RECOMMENDED that
1311
+ the techniques outlined in the core specification be used to whatever extent
1312
+ is possible.
1305
1313
</t >
1306
1314
<section title =" One link per target and relation type" >
1307
1315
<t >
@@ -1352,6 +1360,8 @@ for varname in templateData:
1352
1360
that are suitable for PATCH-ing define a syntax for expressing changes
1353
1361
to a document, which can be applied to the representation described by
1354
1362
"targetSchema" to determine the set of syntactically valid request payloads.
1363
+ Often, the simplest way to validate a PATCH is to apply it and validate
1364
+ the result as a normal representation.
1355
1365
</t >
1356
1366
<t >
1357
1367
HTTP POST request payloads are described by the "submissionSchema" and
@@ -1429,6 +1439,31 @@ for varname in templateData:
1429
1439
<xref target =" collectionAndItem" />.
1430
1440
</t >
1431
1441
</section >
1442
+ <section title =" Content negotiation and schema evolution" >
1443
+ <t >
1444
+ JSON Hyper-Schema facilitates HTTP content negotiation, and allows for
1445
+ a hybrid of the proactive and reactive strategies. As mentioned
1446
+ above, a hyper-schema can include a schema for HTTP headers such as
1447
+ "Accept", "Accept-Charset", "Accept-Language", etc with the "headerSchema"
1448
+ keyword. A user agent or client application can use information in
1449
+ this schema, such as an enumerated list of supported languages, in lieu of
1450
+ making an initial request to start the reactive negotiation process.
1451
+ </t >
1452
+ <t >
1453
+ In this way, the proactive content negotiation technique of setting these
1454
+ headers can be informed by server information about what values are
1455
+ possible, similar to examining a list of alternatives in reactive negotiation.
1456
+ </t >
1457
+ <t >
1458
+ For media types that allow specifying a schema as a media type parameter,
1459
+ the "Accept" values sent in a request or advertised in "headerSchema" can
1460
+ include the URI(s) of the schema(s) to which the negotiated representation
1461
+ is expected to conform. One possible use for schema parameters in
1462
+ content negotiation is if the resource has conformed to several different
1463
+ schema versions over time. The client can indicate what version(s) it
1464
+ understands in the "Accept" header in this way.
1465
+ </t >
1466
+ </section >
1432
1467
</section >
1433
1468
1434
1469
<section title =" Examples" anchor =" examples" >
0 commit comments