Skip to content

Commit f3129ab

Browse files
committed
Name media type keywords consistently.
This addresses issue #409. "submissionEncType" is actually a media type, not an encoding, so name it accordingly. Rename "mediaType" to "targetMediaType" to make it unambiguous and fit with "target" and "targetHints".
1 parent 35d1524 commit f3129ab

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

jsonschema-hyperschema.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@
435435
<section title="Submitting data for processing">
436436
<t>
437437
The <xref target="submissionSchema">"submissionSchema"</xref> and
438-
<xref target="submissionEncType">"submissionEncType"</xref> keywords
438+
<xref target="submissionMediaType">"submissionMediaType"</xref> keywords
439439
describe the ___domain of the processing function implemented by the target
440440
resource. Otherwise, as noted above, the submission schema and encoding are
441441
ignored for operations to which they are not relevant.
@@ -1064,7 +1064,7 @@ GET /foo/
10641064
</section>
10651065
<section title="Security Considerations for &quot;targetSchema&quot;">
10661066
<t>
1067-
This property has similar security concerns to that of "mediaType".
1067+
This property has similar security concerns to that of "targetMediaType".
10681068
Clients MUST NOT use the value of this property to aid in the interpretation
10691069
of the data received in response to following the link, as this leaves
10701070
"safe" data open to re-interpretation.
@@ -1205,7 +1205,7 @@ GET /foo/
12051205
</section>
12061206
</section>
12071207

1208-
<section title="mediaType">
1208+
<section title="targetMediaType">
12091209
<t>
12101210
The value of this property is advisory only, and represents the media type
12111211
<xref target="RFC2046">RFC 2046</xref>, that is expected to be returned when
@@ -1253,15 +1253,15 @@ GET /foo/
12531253
}, {
12541254
"rel": "alternate",
12551255
"href": "/{id}/html",
1256-
"mediaType": "text/html"
1256+
"targetMediaType": "text/html"
12571257
}, {
12581258
"rel": "alternate",
12591259
"href": "/{id}/rss",
1260-
"mediaType": "application/rss+xml"
1260+
"targetMediaType": "application/rss+xml"
12611261
}, {
12621262
"rel": "icon",
12631263
"href": "{id}/icon",
1264-
"mediaType": "image/*"
1264+
"targetMediaType": "image/*"
12651265
}]
12661266
}
12671267
]]>
@@ -1293,18 +1293,18 @@ GET /foo/
12931293
feed, had it been displayed in the main view.
12941294
</t>
12951295

1296-
<section title="Security concerns for &quot;mediaType&quot;">
1296+
<section title="Security concerns for &quot;targetMediaType&quot;">
12971297
<t>
1298-
The "mediaType" property in link definitions defines the expected format of
1299-
the link's target.
1298+
The "targetMediaType" property in link definitions defines the expected
1299+
format of the link's target.
13001300
However, this is advisory only, and MUST NOT be considered authoritative.
13011301
</t>
13021302

13031303
<t>
13041304
When choosing how to interpret data, the type information provided by the
13051305
server (or inferred from the filename, or any other usual method) MUST be
1306-
the only consideration, and the "mediaType" property of the link MUST NOT be
1307-
used.
1306+
the only consideration, and the "targetMediaType" property of the link
1307+
MUST NOT be used.
13081308
User agents MAY use this information to determine how they represent the
13091309
link or where to display it (for example hover-text, opening in a new tab).
13101310
If user agents decide to pass the link to an external program, they SHOULD
@@ -1436,7 +1436,7 @@ GET /foo/
14361436
</section>
14371437
</section>
14381438

1439-
<section title="submissionEncType" anchor="submissionEncType">
1439+
<section title="submissionMediaType" anchor="submissionMediaType">
14401440
<t>
14411441
If present, this property indicates the media type format the
14421442
client should use for the request payload described by
@@ -1446,7 +1446,7 @@ GET /foo/
14461446
Omitting this keyword has the same behavior as a value of application/json.
14471447
</t>
14481448
<t>
1449-
Note that "submissionEncType" and "submissionSchema"
1449+
Note that "submissionMediaType" and "submissionSchema"
14501450
are not restricted to HTTP URIs.
14511451

14521452
<figure>
@@ -1459,7 +1459,7 @@ GET /foo/
14591459
<artwork>
14601460
<![CDATA[{
14611461
"links": [{
1462-
"submissionEncType": "multipart/alternative; boundary=ab12",
1462+
"submissionMediaType": "multipart/alternative; boundary=ab2",
14631463
"rel": "author",
14641464
"href": "mailto:[email protected]{?subject}",
14651465
"hrefSchema": {
@@ -1493,7 +1493,7 @@ GET /foo/
14931493
<section title="submissionSchema" anchor="submissionSchema">
14941494
<t>
14951495
This property contains a schema which defines the acceptable structure
1496-
of the document to be encoded according to the "submissionEncType" property
1496+
of the document to be encoded according to the "submissionMediaType" property
14971497
and sent to the target resource for processing. This can be viewed as
14981498
describing the ___domain of the processing function implemented by the
14991499
target resource.

0 commit comments

Comments
 (0)