Skip to content

Commit 0ab8a2d

Browse files
committed
Content Negotiation: Remove detailed error requirement; use 415
1 parent 12c91a0 commit 0ab8a2d

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

format/index.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,15 @@ interpreted as described in RFC 2119
3131
Clients **MUST** send all JSON API data in request documents with the header
3232
`Content-Type: application/vnd.api+json`, without any media type parameters.
3333

34+
If clients violate this requirement, servers **MUST** return a
35+
`415 Unsupported Media Type` status code.
36+
3437
Clients that include the JSON API media type in their `Accept` header, **MUST**
3538
specify the media type there at least once without any media type parameters.
3639

37-
Servers **MUST** return a `400 Bad Request` status code if clients violate
38-
either of the requirements above. The server's response to such violations
39-
**MUST** contain a JSON API document with an [error object](#error-objects).
40-
The `"href"` member of that object **MUST** be
41-
`"http://jsonapi.org/errors/invalid-media-type-parameter"`.
42-
4340
Servers **MUST** send all JSON API data in response documents with the header
4441
`Content-Type: application/vnd.api+json`, without any media type parameters.
4542

46-
Clients **MUST** ignore any parameters for the `application/vnd.api+json`
47-
media type received in the `Content-Type` header of response documents.
48-
49-
> Note: These requirements exist to allow future versions of this specification
50-
to use media type parameters for extension negotiation and versioning.
51-
5243
Servers **MUST NOT** send responses with the `application/vnd.api+json` media
5344
type if the client has not indicated, using its `Accept` header, that it can
5445
understand this format.
@@ -60,6 +51,12 @@ considered to be sending "JSON API data" for the purposes of the requirement
6051
above, but rather simple JSON data, and the client cannot rely on any of the
6152
rules laid out in this specification.
6253

54+
Clients **MUST** ignore any parameters for the `application/vnd.api+json`
55+
media type received in the `Content-Type` header of response documents.
56+
57+
> Note: These requirements exist to allow future versions of this specification
58+
to use media type parameters for extension negotiation and versioning.
59+
6360
## Document Structure <a href="#document-structure" id="document-structure" class="headerlink"></a>
6461

6562
This section describes the structure of a JSON API document, which is identified

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy