Consolidate ConNeg requirements into the LWS Media Type Section#190
Open
ebremer wants to merge 2 commits into
Open
Consolidate ConNeg requirements into the LWS Media Type Section#190ebremer wants to merge 2 commits into
ebremer wants to merge 2 commits into
Conversation
acoburn
reviewed
Jul 10, 2026
Comment on lines
7
to
+17
| #### Content Negotiation | ||
|
|
||
| Servers MUST support content negotiation for container representations. The response payload MUST be identical regardless of the requested media type — only the `Content-Type` response header varies: | ||
|
|
||
| - If a client requests `application/lws+json`, the server MUST respond with `Content-Type: application/lws+json`. | ||
| - If a client requests `application/ld+json`, the server MUST respond with `Content-Type: application/ld+json`. | ||
| - If a client requests `application/json`, the server MUST respond with `Content-Type: application/json`. | ||
|
|
||
| In all three cases, the response body is the same JSON-LD document conforming to the LWS container vocabulary. Servers are free to support additional media types (e.g., `text/turtle`) through content negotiation. | ||
| In all three cases, the response body is the same JSON-LD document conforming to the <a>container representation</a> structure defined in [](#container-representation). Servers MAY support additional media types through content negotiation. | ||
|
|
||
| Because the `Content-Type` of these responses varies with the request's `Accept` header, responses subject to content negotiation SHOULD include a `Vary: Accept` header [[!RFC9110]]. |
Member
There was a problem hiding this comment.
I believe we are incorrect in describing this as content-negotiation.
It would be more accurate to say that these media types are treated as equivalent. Content negotiation is more commonly used for negotiating between different representations (e.g. image/jpeg vs image/png or application/n-triples vs text/turtle): representations whose body is encoded differently.
Here, we are saying that HTTP entity bodies with the media type application/lws+json are treated as equivalent to entity bodies with the media types application/ld+json and application/json.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #91
Preview | Diff