8000 Cleanups in rules for extensions · roy-coder/json-api@c96505e · GitHub
[go: up one dir, main page]

Skip to content

Commit c96505e

Browse files
committed
Cleanups in rules for extensions
1 parent 223338c commit c96505e

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

_format/1.1/index.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,14 @@ add to, or remove specification semantics.
7272
### <a href="#media-type-parameter-rules" id="media-type-parameter-rules" class="headerlink"></a> Rules for Media Type Parameters
7373

7474
The JSON:API media type **MUST NOT** be specified with any media type parameters
75-
other than `ext` and `profile`.
75+
other than `ext` and `profile`. The `ext` parameter is used to support
76+
[extensions] and the `profile` parameter is used to support [profiles].
7677

7778
Extensions and profiles are each uniquely identified by a
78-
[URI](https://tools.ietf.org/html/rfc3986). Visiting an extension's or a profile's
79-
URI **SHOULD** return documentation that describes its usage.
80-
81-
The `ext` parameter is used to support [extensions] and the `profile` parameter
82-
is used to support [profiles]. The values of the `ext` and `profile` parameters
83-
**MUST** equal a space-separated (U+0020 SPACE, " ") list of extension or
84-
profile URIs, respectively.
79+
[URI](https://tools.ietf.org/html/rfc3986). Visiting an extension's or a
80+
profile's URI **SHOULD** return documentation that describes its usage. The
81+
values of the `ext` and `profile` parameters **MUST** equal a space-separated
82+
(U+0020 SPACE, " ") list of extension or profile URIs, respectively.
8583

8684
> Note: When serializing the `ext` or `profile` media type parameters, the HTTP
8785
> specification requires that parameter values be surrounded by quotation marks
@@ -96,16 +94,16 @@ An extension **MUST NOT** lessen or remove any processing rules, restrictions or
9694
object member requirements defined in this specification or other extensions.
9795

9896
An extension **MAY** define new members within the document structure defined by
99-
this specification. The rules for extension members are covered
97+
this specification. The rules for extension member names are covered
10098
[below](#extension-members).
10199

102100
An extension **MAY** define new query parameters. The rules for extension-defined
103101
query parameters are covered [below](#extension-query-parameters).
104102

105-
If an extension defines new query parameters or document members, the extension
106-
**MUST** define a namespace to guarantee that extensions will never conflict
107-
with the current or future versions of this specification. A namespace **MUST**
108-
meet all of the following conditions:
103+
When an extension defines new query parameters or document members, the
104+
extension **MUST** define a namespace to guarantee that extensions will never
105+
conflict with current or future versions of this specification. A namespace
106+
**MUST** meet all of the following conditions:
109107

110108
- A namespace **MUST** contain at least one character.
111109
- A namespace **MUST** contain only these characters:
@@ -114,14 +112,17 @@ meet all of the following conditions:
114112
- U+0030 to U+0039, "0-9"
115113

116114
An extension **MUST NOT** define more than one namespace. The namespace used for
117-
all query parameters and documents members **MUST** be the same for any given
115+
all query parameters and document members **MUST** be the same for any given
118116
extension.
119117

120118
In the following example, an extension with the namespace `version` has
121119
specified a resource object member `version:id` to support per-resource
122120
versioning. This member might appear as follows:
123121

124122
```json
123+
HTTP/1.1 200 OK
124+
Content-Type: application/vnd.api+json; ext="https://jsonapi.org/ext/version"
125+
125126
// ...
126127
{
127128
"type": "articles",

0 commit comments

Comments
 (0)
0