Skip to content

Commit f1a2fcd

Browse files
jelhandgeb
andauthored
Clarify processing rules for malformed ext and profile members of JSON:API object (#1607)
* Clarify processing rules for malformed `ext` and `profile` members of JSON:API object The applied extension and profiles must be provided as `ext` and `profile` media type parameters of `Content-Type` header. Additionally they may be listed as `jsonapi.ext` and `jsonapi.profile` member of a JSON:API document. This opens up the possibility of having different values in both places. So far the specification has not defined processing rules for such malformed documents. This clarifies that a client and server must honor the `Content-Type` header in case of a conflict. Additionally it clarifies that they should not reject the document but ignore the invalid `jsonapi.ext` and/or `jsonapi.profile` members. Ignoring them in case of a conflict rather than rejecting the document allows server and clients to _not_ process them at all - even if present. This avoids computing overhead just for the sake of validating the document. * Update _format/1.1/index.md Co-authored-by: Jeldrik Hanschke <jelhan@users.noreply.github.com> * Update _format/1.1/index.md Co-authored-by: Dan Gebhardt <dan@cerebris.com>
1 parent f901c57 commit f1a2fcd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

_format/1.1/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,10 @@ The jsonapi object **MAY** contain any of the following members:
831831
* `profile` - an array of URIs for all applied [profiles].
832832
* `meta` - a [meta] object that contains non-standard meta-information.
833833

834+
Clients and servers **MUST NOT** use an `ext` or `profile` member for content
835+
negotiation. Content negotiation **MUST** only happen based on media type
836+
parameters in `Content-Type` header.
837+
834838
A simple example appears below:
835839

836840
```json

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