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
54
55
56
57
58
59
60
61
62
63
|
[
{
"description": "validating type",
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://json-schema.org/tests/content/draft2020-12/type/0",
"type": "string",
"anyOf": [ true ]
},
"tests": [
{
"description": "incorrect type must be reported, but a message is not required",
"data": 1,
"output": {
"basic": {
"$id": "https://json-schema.org/tests/content/draft2020-12/type/0/tests/0/basic",
"$ref": "/draft/2020-12/output/schema",
"properties": {
"errors": {
"contains": {
"properties": {
"keywordLocation": {"const": "/type"},
"absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2020-12/type/0#/type"},
"instanceLocation": {"const": ""},
"annotation": false
},
"required": ["keywordLocation", "instanceLocation"]
}
}
},
"required": ["errors"]
}
}
},
{
"description": "correct type yields an output unit",
"data": "a string",
"output": {
"basic": {
"$id": "https://json-schema.org/tests/content/draft2020-12/type/0/tests/1/basic",
"$ref": "/draft/2020-12/output/schema",
"properties": {
"annotations": {
"contains": {
"properties": {
"valid": {"const": true},
"keywordLocation": {"const": "/type"},
"absoluteKeywordLocation": {"const": "https://json-schema.org/tests/content/draft2020-12/type/0#/type"},
"instanceLocation": {"const": ""},
"annotation": false,
"error": false
},
"required": ["keywordLocation", "instanceLocation"]
}
}
},
"required": ["annotations"]
}
}
}
]
}
]
|