-
-
Notifications
You must be signed in to change notification settings - Fork 272
Expand file tree
/
Copy pathbasic.json
More file actions
53 lines (53 loc) · 2.2 KB
/
basic.json
File metadata and controls
53 lines (53 loc) · 2.2 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
[
{
"description": "basic output has valid, errors array, each error has keywordLocation, instanceLocation, valid",
"schema": {
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://json-schema.org/tests/structure/draft2019-09/basic/0",
"type": "string",
"anyOf": [true]
},
"tests": [
{
"description": "invalid data produces valid: false and errors array",
"data": 1,
"output": {
"basic": {
"$id": "https://json-schema.org/tests/structure/draft2019-09/basic/0/tests/0/basic",
"$ref": "/draft/2019-09/output/schema",
"properties": {
"valid": { "const": false },
"errors": {
"type": "array",
"minItems": 1,
"items": {
"required": ["keywordLocation", "instanceLocation", "valid"],
"properties": {
"keywordLocation": { "type": "string" },
"instanceLocation": { "type": "string" },
"valid": { "type": "boolean" }
}
}
}
},
"required": ["valid", "errors"]
}
}
},
{
"description": "valid data produces valid true, no errors or empty",
"data": "hello",
"output": {
"basic": {
"$id": "https://json-schema.org/tests/structure/draft2019-09/basic/0/tests/1/basic",
"$ref": "/draft/2019-09/output/schema",
"properties": {
"valid": { "const": true }
},
"required": ["valid"]
}
}
}
]
}
]