Skip to content

Commit 2554623

Browse files
authored
Merge pull request json-api#1171 from meyerbaptiste/fix_bad_values_attributes_relationships
Fix: a resource can't have an attribute or relationship named type or id
2 parents 83098b8 + 92fd782 commit 2554623

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

schema

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
"description": "Members of the attributes object (\"attributes\") represent information about the resource object in which it's defined.",
198198
"type": "object",
199199
"patternProperties": {
200-
"^(?!relationships$|links$)\\w[-\\w_]*$": {
200+
"^(?!relationships$|links$|id$|type$)\\w[-\\w_]*$": {
201201
"description": "Attributes may contain any valid JSON value."
202202
}
203203
},
@@ -208,7 +208,7 @@
208208
"description": "Members of the relationships object (\"relationships\") represent references from the resource object in which it's defined to other resource objects.",
209209
"type": "object",
210210
"patternProperties": {
211-
"^\\w[-\\w_]*$": {
211+
"^(?!id$|type$)\\w[-\\w_]*$": {
212212
"properties": {
213213
"links": {
214214
"$ref": "#/definitions/links"

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