Skip to content

Commit 8ce88f1

Browse files
committed
script linting
1 parent 4dd116c commit 8ce88f1

22 files changed

+1339
-4
lines changed

_schemas/1.1/schema.json

Lines changed: 768 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://jsonapi.org/schemas/spec/v1.1/draft/create/resource",
4+
"title": "JSON:API Schema for POST request",
5+
"description": "This schema only validates a request for POSTing a new resource.",
6+
"type": "object",
7+
"required": [
8+
"data"
9+
],
10+
"anyOf": [
11+
{
12+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/atMemberName"
13+
}
14+
],
15+
"properties": {
16+
"data": {
17+
"$ref": "#/definitions/resource"
18+
},
19+
"jsonapi": {
20+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/jsonapi"
21+
},
22+
"meta": {
23+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/meta"
24+
}
25+
},
26+
"unevaluatedProperties": false,
27+
"definitions": {
28+
"resource": {
29+
"description": "\"Resource objects\" appear in a JSON:API document to represent resources.",
30+
"type": "object",
31+
"allOf": [
32+
{
33+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/resourceIdentificationNew"
34+
}
35+
],
36+
"properties": {
37+
"attributes": {
38+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/attributes"
39+
},
40+
"meta": {
41+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/meta"
42+
},
43+
"relationships": {
44+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/relationshipsFromRequest"
45+
}
46+
},
47+
"unevaluatedProperties": false
48+
}
49+
}
50+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://jsonapi.org/schemas/spec/v1.1/draft/update/relationship",
4+
"title": "JSON:API Schema for POST request",
5+
"description": "This schema only validates a request for PATCHing a resource's relationship.",
6+
"type": "object",
7+
"required": [
8+
"data"
9+
],
10+
"anyOf": [
11+
{
12+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/atMemberName"
13+
}
14+
],
15+
"properties": {
16+
"data": {
17+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/linkage"
18+
},
19+
"jsonapi": {
20+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/jsonapi"
21+
},
22+
"meta": {
23+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/meta"
24+
}
25+
},
26+
"unevaluatedProperties": false
27+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://jsonapi.org/schemas/spec/v1.1/draft/update/resource",
4+
"title": "JSON:API Schema for POST request",
5+
"description": "This schema only validates a request for PATCHing a resource.",
6+
"type": "object",
7+
"required": [
8+
"data"
9+
],
10+
"anyOf": [
11+
{
12+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/atMemberName"
13+
}
14+
],
15+
"properties": {
16+
"data": {
17+
"$ref": "#/definitions/resource"
18+
},
19+
"jsonapi": {
20+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/jsonapi"
21+
},
22+
"meta": {
23+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/meta"
24+
}
25+
},
26+
"unevaluatedProperties": false,
27+
"definitions": {
28+
"resource": {
29+
"description": "\"Resource objects\" appear in a JSON:API document to represent resources.",
30+
"type": "object",
31+
"allOf": [
32+
{
33+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/resourceIdentification"
34+
}
35+
],
36+
"properties": {
37+
"attributes": {
38+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/attributes"
39+
},
40+
"meta": {
41+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/meta"
42+
},
43+
"relationships": {
44+
"$ref": "https://jsonapi.org/schemas/spec/v1.1/draft#/definitions/relationshipsFromRequest"
45+
}
46+
},
47+
"unevaluatedProperties": false
48+
}
49+
}
50+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"data": [
3+
{
4+
"type": "article",
5+
"lid": 6
6+
}
7+
],
8+
"meta": {
9+
"errors-present-in-document": [
10+
{
11+
"detail": "A resource's lid member **MUST** be a string.",
12+
"source": {
13+
"pointer": "/data/0/lid"
14+
}
15+
}
16+
]
17+
}
18+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"data": [
3+
{
4+
"type": "article",
5+
"lid": "local_id"
6+
}
7+
]
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@member": "ok",
3+
"data": [
4+
{
5+
"@member": "ok",
6+
"type": "article",
7+
"lid": "local_id"
8+
}
9+
]
10+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"data": {
3+
"type": "article",
4+
"lid": 6,
5+
"attributes": {
6+
"title": "JSON:API, a specification for building APIs in JSON"
7+
}
8+
},
9+
"meta": {
10+
"errors-present-in-document": [
11+
{
12+
"detail": "A resource's lid member **MUST** be a string.",
13+
"source": {
14+
"pointer": "/data/lid"
15+
}
16+
}
17+
]
18+
}
19+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"data": {
3+
"type": "article",
4+
"lid": "local_id",
5+
"attributes": {
6+
"title": "JSON:API, a specification for building APIs in JSON"
7+
}
8+
}
9+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"@member": "ok",
3+
"data": {
4+
"@member": "ok",
5+
"type": "article",
6+
"lid": "local_id",
7+
"attributes": {
8+
"@member": "ok",
9+
"title": "JSON:API, a specification for building APIs in JSON"
10+
}
11+
}
12+
}

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