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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# ajv errors
```json
[
{
"instancePath": "/dependencies/0",
"keyword": "required",
"message": "must have required property 'role'",
"params": {
"missingProperty": "role"
},
"schemaPath": "#/anyOf/0/required"
},
{
"instancePath": "/dependencies/0",
"keyword": "required",
"message": "must have required property 'src'",
"params": {
"missingProperty": "src"
},
"schemaPath": "#/anyOf/1/required"
},
{
"instancePath": "/dependencies/0",
"keyword": "required",
"message": "must have required property 'name'",
"params": {
"missingProperty": "name"
},
"schemaPath": "#/anyOf/2/required"
},
{
"instancePath": "/dependencies/0",
"keyword": "anyOf",
"message": "must match a schema in anyOf",
"params": {},
"schemaPath": "#/anyOf"
},
{
"instancePath": "/galaxy_info",
"keyword": "required",
"message": "must have required property 'author'",
"params": {
"missingProperty": "author"
},
"schemaPath": "#/allOf/0/then/required"
},
{
"instancePath": "/galaxy_info",
"keyword": "if",
"message": "must match \"then\" schema",
"params": {
"failingKeyword": "then"
},
"schemaPath": "#/allOf/0/if"
}
]
```
# check-jsonschema
stdout:
```json
{
"status": "fail",
"errors": [
{
"filename": "negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml",
"path": "$.dependencies[0]",
"message": "{'version': 'foo'} is not valid under any of the given schemas",
"has_sub_errors": true,
"best_match": {
"path": "$.dependencies[0]",
"message": "'role' is a required property"
},
"sub_errors": [
{
"path": "$.dependencies[0]",
"message": "'role' is a required property"
},
{
"path": "$.dependencies[0]",
"message": "'src' is a required property"
},
{
"path": "$.dependencies[0]",
"message": "'name' is a required property"
}
]
},
{
"filename": "negative_test/roles/role_with_bad_deps_in_meta/meta/main.yml",
"path": "$.galaxy_info",
"message": "'author' is a required property",
"has_sub_errors": false
}
],
"parse_errors": []
}
```
|