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