-
Notifications
You must be signed in to change notification settings - Fork 890
Profile Extensions, Take 3: Extension Rules #1195
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e2fc793
Update content negotiation rules
ethanresnick 46fa03b
Define how clients may request extensions
ethanresnick 9d6b40f
Define aliases
ethanresnick a641e7e
Define profile extensions
ethanresnick d317b9d
Error object: add type, missing; remove code
ethanresnick 8d00970
Define how to add an extension to a doc
ethanresnick f614e8e
Define required extension handling
ethanresnick 1c511b4
Document extension processing
ethanresnick ef5e3de
Update meta definition
ethanresnick e9e24ca
Update docs of extension system
ethanresnick ddf1bde
Fix typos
ethanresnick 1deca50
Merge branch 'gh-pages' into profile-3
ethanresnick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Define required extension handling
- Loading branch information
commit f614e8e49bb838e5bc17187f5abb7d0a932261c7
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1948,6 +1948,23 @@ Accept: application/vnd.api+json;profile="http://jsonapi.org/extensions/last-mod | |
|
||
The server **SHOULD** include as many of the requested extensions as it supports. | ||
|
||
#### <a href="#extending-profile-extensions-required" id="extending-profile-extensions-required" class="headerlink"></a> Required Extensions | ||
|
||
A server **SHOULD NOT** require that clients send documents containing certain | ||
extensions, as such requirements reduce interoperability. | ||
|
||
However, in the event that the server does require one or more extensions (e.g. | ||
for authentication), and the client fails to use those extensions, the server | ||
**MUST** send a `415 Unsupported Media Type` error. In the error's response body, | ||
there **MUST** be an [error object][error objects] for each required extension | ||
that is missing, and this error object **MUST**: | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- have a [`type`](#error-objects) who's URI is | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
`http://jsonapi.org/errors/missing-profile-extension` | ||
|
||
- include the URI of the missing extension in the `extension` member of the | ||
[`missing` object](#error-objects-source-missing). | ||
|
||
### <a href="#extending-profile-extensions-authoring" id="extending-profile-extensions-authoring" class="headerlink"></a> Authoring Profile Extensions | ||
|
||
As mentioned above, a profile extension defines a set of values that can be | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"include every supported extension that was requested"
Perhaps that would read more clearly?