Skip to content

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
wants to merge 12 commits into from
Prev Previous commit
Next Next commit
Define required extension handling
  • Loading branch information
ethanresnick committed Jul 23, 2017
commit f614e8e49bb838e5bc17187f5abb7d0a932261c7
17 changes: 17 additions & 0 deletions _format/1.1/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

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?


#### <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**:

Copy link
Contributor

Choose a reason for hiding this comment

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

**MUST** send a `415 Unsupported Media Type` error with a corresponding error object for each unsupported extension. Each error object **MUST**:

- have a [`type`](#error-objects) who's URI is
Copy link
Contributor

Choose a reason for hiding this comment

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

have a `type` key with the value `http://jsonapi.org/errors/missing-profile-extension`.

`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
Expand Down
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