Skip to content

Commit 451aa76

Browse files
authored
Merge pull request json-api#1329 from json-api/profile-errors
Misc profile fixes
2 parents 6f7e59e + 594f4ea commit 451aa76

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

_format/1.1/index.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1933,8 +1933,8 @@ Accept: application/vnd.api+json;profile="http://example.com/last-modified", app
19331933
It is used to support old servers that don't understand the profile parameter.
19341934

19351935
Servers **MAY** add profiles to a JSON:API document even if the client has not
1936-
requested them. The recipient of a document **MUST** ignore any profile extensions
1937-
in that document that it does not understand. The only exception to this is profiles
1936+
requested them. The recipient of a document **MUST** ignore any profiles in that
1937+
document that it does not understand. The only exception to this is profiles
19381938
whose support is required using the `profile` query parameter, as described later.
19391939

19401940
#### <a href="#profiles-sending" id="profiles-sending" class="headerlink"></a> Sending Profiled Documents
@@ -2002,8 +2002,8 @@ found in the server's internal mapping for the query parameters in use on the
20022002
request.
20032003

20042004
For example, the server might support a profile that defines a meaning for the
2005-
values of the `page[cursor]` query param. Then, it could define its internal
2006-
param name to profile uri mapping like so:
2005+
values of the `page[cursor]` query parameter. Then, it could define its internal
2006+
param name to profile URI mapping like so:
20072007

20082008
```json
20092009
{ "page[cursor]": "https://example.com/pagination-profile" }
@@ -2137,13 +2137,13 @@ element would be a recognized value:
21372137

21382138
```json
21392139
{
2140-
"type": "contacts",
2141-
"id": "345",
2142-
"meta": {
2143-
"timestamps": { "created": "2018-08-29T18:38:17.567Z" }
2144-
}
2145-
//...
2140+
"type": "contacts",
2141+
"id": "345",
2142+
"meta": {
2143+
"timestamps": { "created": "2018-08-29T18:38:17.567Z" }
21462144
}
2145+
//...
2146+
}
21472147
```
21482148

21492149
However, in the following case, the value for `timestamps` is *not* a recognized
@@ -2170,8 +2170,8 @@ element's value would be an unrecognized value.
21702170

21712171
> Note: unrecognized values are not necessarily invalid or erroneous values.
21722172
> For example, the timestamps profile might be revised later to actually define
2173-
> a "createdUnixEpoch" key. This key would be unrecognized by all existing
2174-
> applications at the time, but not by ones created/deployed later.
2173+
> a "createdUnixEpoch" key. This key would be unrecognized by all applications
2174+
> that existed at the time it was defined, but not by ones created/deployed later.
21752175
21762176
Each profile **MAY** define its own rules for how applications should proceed
21772177
when encountering unrecognized values.
@@ -2209,21 +2209,21 @@ profile would need to be ignored:
22092209
{
22102210
//...
22112211
"timestamps": {
2212-
"modified": "Wed Aug 29 2018 15:00:05 GMT-0400",
2212+
"updated": "Wed Aug 29 2018 15:00:05 GMT-0400",
22132213
"created": "2018-08-29T18:38:17.567Z"
22142214
}
22152215
}
22162216
```
22172217

22182218
Ignoring the profile in this case is required by the second default rule,
2219-
because the value for the `modified` key is not recognized under the profile's
2220-
requirement that the `modified` key hold a string of the form produced by
2219+
because the value for the `updated` key is not recognized under the profile's
2220+
requirement that the `updated` key hold a string of the form produced by
22212221
`JSON.stringify`.
22222222

22232223
### <a href="#profiles-authoring" id="profiles-authoring" class="headerlink"></a> Authoring Profiles
22242224

22252225
A profile **MAY** assign meaning to elements of the document structure whose use
2226-
is left up to each implementation, such as resource fields or members of meta
2226+
is left up to each implementation, such as resource fields or members of `meta`
22272227
objects. A profile **MUST NOT** define/assign a meaning to document members
22282228
in areas of the document reserved for future use by the JSON:API specification.
22292229

@@ -2260,7 +2260,7 @@ supported as well.
22602260
including to allow a superset of JSON structures.
22612261

22622262

2263-
> If you create your own profile, you are **strongly encouraged to [register](/extensions/#profile-registration)
2263+
> If you create your own profile, you are **strongly encouraged to [register](/extensions/#profile-creation)
22642264
> it** with the JSON API [profile registry](/extensions/), so that others can
22652265
> find and reuse it.
22662266

extensions/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ By registering your profile:
6161
others use to apply/identify the profile.
6262

6363
3. one of the JSON:API's editors will review your submission to check that it
64-
follows the [profile extension requirements](/format/1.1/#profiles-authoring).
64+
follows the [requirements for profiles](/format/1.1/#profiles-authoring).
6565
These requirements can be a bit tricky, so getting an expert review ensures
6666
that your profile is legal for use with JSON:API.
6767

@@ -77,7 +77,7 @@ To register your profile:
7777
2. Create a PR to [the json-api repository](https://github.com/json-api/json-api).
7878
In the PR, make a directory at `_profiles/{NAMESPACE}/{PROFILE_NAME}` (where
7979
`PROFILE_NAME` is the name of your profile, dasherized), and put your filled
80-
out template as the `index.md` file in that directory folder. (See [an example](https://github.com/json-api/json-api/tree/1.1/_profiles/ethanresnick/cursor-pagination).)
80+
out template as the `index.md` file in that directory folder. (See [an example](https://github.com/json-api/json-api/tree/gh-pages/_profiles/ethanresnick/cursor-pagination).)
8181

8282
Once submitted, one of JSON:API's editors will review your profile to check that
8383
it: 1) follows the template above; 2) complies with JSON:API's [requirements for profiles](/format/1.1/#profiles-authoring);
@@ -99,9 +99,9 @@ If you do change your submission after it's been reviewed, it will be re-reviewe
9999
to make sure it still complies with the requirements for approval given above.
100100

101101
JSON:API's editors may occasionally reassign responsibility for a registered
102-
profile. The most common case of this will be to enable changes to be made to
103-
profiles where the author of the registration has died, moved out of contact or
104-
is otherwise unable to make changes that are important to the community.
102+
profile. The most common reason for this will be to enable changes to be made
103+
to profiles where the author of the registration has died, moved out of contact
104+
or is otherwise unable to make changes that are important to the community.
105105

106106
Even though profile registration is strongly encouraged, it is not mandatory.
107107
If you choose not to register your profile, you can create your own URL, on

0 commit comments

Comments
 (0)
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