forked from json-api/json-api
-
Notifications
You must be signed in to change notification settings - Fork 118
/
schema
40 lines (40 loc) · 889 Bytes
/
schema
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
"id": "http://jsonapi.org/schema#",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "JSON API Schema",
"description": "This is a schema for responses in the JSON API format. For more, see http://jsonapi.org",
"type": "object",
"resources":{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type":["string"] },
"href": { "type":"string" },
"links": { "type": "object" }
},
"required": ["id"]
}
},
"patternProperties": {
"^(?!href$)(?!links$)(?!id$)(?!meta)(?!linked)": {
"$ref":"#/resources"
}
},
"properties": {
"meta": {
"type": "object"
},
"links":{
"type": "object"
},
"linked": {
"type": "object",
"patternProperties": {
".*": {
"$ref":"#/resources"
}
}
}
}
}