Skip to content

Commit 3d839ca

Browse files
authored
Merge pull request #426 from handrews/accept
Allow "headerSchema" for content negotiation
2 parents abaa3c8 + 8df17ac commit 3d839ca

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

jsonschema-hyperschema.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,9 +1361,18 @@ GET /foo/
13611361
</t>
13621362

13631363
<t>
1364-
If this property's value is not specified, then the value should be taken to be
1365-
"application/json". Hyper-Schema authors SHOULD NOT use a protocol-specific
1366-
value in <xref target="targetHints">"targetHints"</xref> for this purpose.
1364+
For protocols supporting content-negotiation, implementations MAY choose to
1365+
describe possible target media types using protocol-specific information in
1366+
<xref target="headerSchema">"headerSchema"</xref>. If both protocol-specific
1367+
information and "mediaType" are present, then the value of "mediaType" MUST
1368+
be compatible with the protocol-specific information, and SHOULD indicate
1369+
the media type that will be used in the absence of content negotiation.
1370+
1371+
</t>
1372+
<t>
1373+
When no such protocol-specific information is available, or when the
1374+
implementation does not recognize the protocol involved, then the value
1375+
SHOULD be taken to be "application/json".
13671376
</t>
13681377

13691378
<figure>

0 commit comments

Comments
 (0)