@@ -1333,29 +1333,38 @@ for varname in templateData:
1333
1333
</section >
1334
1334
<section title =' "targetSchema" and HTTP' anchor =" targetHTTP" >
1335
1335
<t >
1336
- The relationship between a resource's representation and HTTP requests and
1337
- responses is determined by <xref target =" RFC7231" >RFC 7231, section 4.3.1 -
1338
- "GET", section 4.3.4 "PUT", and section 3.1.4.2, "Content-Location"</xref >.
1336
+ "targetSchema" describes the resource on the target end of the link, while
1337
+ "targetMediaType" defines that resource's media type. With HTTP links,
1338
+ "headerSchema" can also be used to describe valid values for use in an
1339
+ "Accept" request header, which can support multiple media types or
1340
+ media ranges. When both ways of indicating the target media type are
1341
+ present, "targetMediaType" SHOULD indicate the default representation
1342
+ media type, while the schema for "accept" in "headerSchema" SHOULD include
1343
+ the default as well as any alternate media types or media ranges that can
1344
+ be requested.
1345
+ </t >
1346
+ <t >
1347
+ Since the semantics of many HTTP methods are defined in terms of the target
1348
+ resource, "targetSchema" is used for requests and/or responses for several
1349
+ HTTP methods.
1339
1350
In particular, "targetSchema" suggests what a client can expect for the
1340
1351
response to an HTTP GET or any response for which the "Content-Location"
1341
1352
header is equal to the request URI, and what a client should send if it
1342
1353
replaces the resource in an HTTP PUT request.
1343
- </t >
1344
- <t >
1345
- The media type of the representation is given by the "targetMediaType"
1346
- field. Alternatively, possible available media types MAY be advertised
1347
- for HTTP-accessible resources using the "accept" field in "headerSchema",
1348
- corresponding to the HTTP "Accept" header.
1354
+ These correlations are defined by <xref target =" RFC7231" >RFC 7231,
1355
+ section 4.3.1 - "GET", section 4.3.4 "PUT", and section 3.1.4.2,
1356
+ "Content-Location"</xref >.
1349
1357
</t >
1350
1358
<t >
1351
1359
Per <xref target =" RFC5789" >RFC 5789</xref >, the request structure for an HTTP
1352
1360
PATCH is determined by the combination of "targetSchema" and the request
1353
- media type, which is conveyed by the "Accept-Patch" header. Media types
1354
- that are suitable for PATCH-ing define a syntax for expressing changes
1355
- to a document, which can be applied to the representation described by
1356
- "targetSchema" to determine the set of syntactically valid request payloads.
1357
- Often, the simplest way to validate a PATCH is to apply it and validate
1358
- the result as a normal representation.
1361
+ media type, which is conveyed by the "Accept-Patch" header, which may be
1362
+ included in "targetHints". Media types that are suitable for PATCH-ing
1363
+ define a syntax for expressing changes to a document, which can be applied
1364
+ to the representation described by "targetSchema" to determine the set of
1365
+ syntactically valid request payloads. Often, the simplest way to validate
1366
+ a PATCH request is to apply it and validate the result as a normal
1367
+ representation.
1359
1368
</t >
1360
1369
<t >
1361
1370
HTTP POST request payloads are described by the "submissionSchema" and
0 commit comments