Skip to content

Commit b114d64

Browse files
authored
Merge pull request #695 from handrews/accept-behavior
Explain schema media type param and Accept
2 parents 27dd4ee + 114b8c6 commit b114d64

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

jsonschema-core.xml

+31-1
Original file line numberDiff line numberDiff line change
@@ -2912,7 +2912,8 @@ Content-Type: application/json;
29122912
</figure>
29132913

29142914
<t>
2915-
Multiple schemas are whitespace separated:
2915+
Multiple schemas are whitespace separated, and indicate that the
2916+
instance conforms to all of the listed schemas:
29162917
</t>
29172918

29182919
<figure>
@@ -2924,6 +2925,35 @@ Content-Type: application/json;
29242925
</artwork>
29252926
</figure>
29262927

2928+
<t>
2929+
Media type parameters are also used in HTTP's Accept request header:
2930+
</t>
2931+
2932+
<figure>
2933+
<artwork>
2934+
<![CDATA[
2935+
Accept: application/json;
2936+
schema="http://example.com/qiang http://example.com/li",
2937+
application/json;
2938+
schema="http://example.com/kumar"
2939+
]]>
2940+
</artwork>
2941+
</figure>
2942+
2943+
<t>
2944+
As with Content-Type, multiple schema parameters in the same string
2945+
requests an instance that conforms to all of the listed schemas.
2946+
</t>
2947+
2948+
<t>
2949+
Unlike Content-Type, Accept can contain multiple values to
2950+
indicate that the client can accept several media types.
2951+
In the above example, note that the two media types differ
2952+
only by their schema parameter values. This requests an
2953+
application/json representation that conforms to at least one
2954+
of the identified schemas.
2955+
</t>
2956+
29272957
<t>
29282958
<cref>
29292959
This paragraph assumes that we can register a "schema" link relation.

0 commit comments

Comments
 (0)