Skip to content

add example for multiple extensions applied #1773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

jelhan
Copy link
Contributor

@jelhan jelhan commented Nov 7, 2024

The question how a media type looks like if multiple extensions or profiles have been applied came up twice (#1770, #1768). It was already well defined in the specification:

The values of the ext and profile parameters MUST equal a space-separated (U+0020 SPACE, " ") list of extension or profile URIs, respectively.

This PR adds an additional example similar to the examples we have in other cases for additional clarity.

Closes #1770

Comment on lines +96 to +101
In the following example, two extensions and one profile have been applied:

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json;ext="https://example.com/version https://example.com/bulk";profile="https://example.com/resource-timestamps"
```
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if the example should go here or a little bit later into the Content Negotiation section. The specification addresses the topic at two places. Just before this new paragraph it defines that the value of the media type parameters is a space-separated list. But how and when the media type is used, is defined later in the section on content negotiation.

I'm not opinionated at all where we put this example.

@Roanmh
Copy link

Roanmh commented Nov 7, 2024

Looks great, thank you!

@jelhan jelhan requested a review from dgeb November 8, 2024 12:30
Copy link
Member

@dgeb dgeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is titled "Rules for Media Type Parameters" I think this is a fine placement of this section.

@jelhan jelhan merged commit 550f6d5 into gh-pages Nov 10, 2024
1 check passed
@jelhan jelhan deleted the example-illustrating-multiple-extensions branch November 10, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Media Type parameter spec lacks example of multiple values
3 participants
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