| 1 |
# ajv errors |
| 2 |
|
| 3 |
```json |
| 4 |
[ |
| 5 |
{ |
| 6 |
"instancePath": "", |
| 7 |
"keyword": "type", |
| 8 |
"message": "must be array", |
| 9 |
"params": { |
| 10 |
"type": "array" |
| 11 |
}, |
| 12 |
"schemaPath": "#/anyOf/0/type" |
| 13 |
}, |
| 14 |
{ |
| 15 |
"instancePath": "", |
| 16 |
"keyword": "required", |
| 17 |
"message": "must have required property 'collections'", |
| 18 |
"params": { |
| 19 |
"missingProperty": "collections" |
| 20 |
}, |
| 21 |
"schemaPath": "#/anyOf/0/required" |
| 22 |
}, |
| 23 |
{ |
| 24 |
"instancePath": "", |
| 25 |
"keyword": "required", |
| 26 |
"message": "must have required property 'roles'", |
| 27 |
"params": { |
| 28 |
"missingProperty": "roles" |
| 29 |
}, |
| 30 |
"schemaPath": "#/anyOf/1/required" |
| 31 |
}, |
| 32 |
{ |
| 33 |
"instancePath": "", |
| 34 |
"keyword": "anyOf", |
| 35 |
"message": "must match a schema in anyOf", |
| 36 |
"params": {}, |
| 37 |
"schemaPath": "#/anyOf" |
| 38 |
}, |
| 39 |
{ |
| 40 |
"instancePath": "", |
| 41 |
"keyword": "additionalProperties", |
| 42 |
"message": "must NOT have additional properties", |
| 43 |
"params": { |
| 44 |
"additionalProperty": "foo" |
| 45 |
}, |
| 46 |
"schemaPath": "#/additionalProperties" |
| 47 |
}, |
| 48 |
{ |
| 49 |
"instancePath": "", |
| 50 |
"keyword": "anyOf", |
| 51 |
"message": "must match a schema in anyOf", |
| 52 |
"params": {}, |
| 53 |
"schemaPath": "#/anyOf" |
| 54 |
} |
| 55 |
] |
| 56 |
``` |
| 57 |
|
| 58 |
# check-jsonschema |
| 59 |
|
| 60 |
stdout: |
| 61 |
|
| 62 |
```json |
| 63 |
{ |
| 64 |
"status": "fail", |
| 65 |
"successes": [], |
| 66 |
"errors": [ |
| 67 |
{ |
| 68 |
"filename": "negative_test/reqs3/meta/requirements.yml", |
| 69 |
"path": "$", |
| 70 |
"message": "{'foo': 'bar'} is not valid under any of the given schemas", |
| 71 |
"has_sub_errors": true, |
| 72 |
"best_match": { |
| 73 |
"path": "$", |
| 74 |
"message": "{'foo': 'bar'} is not of type 'array'" |
| 75 |
}, |
| 76 |
"best_deep_match": { |
| 77 |
"path": "$", |
| 78 |
"message": "{'foo': 'bar'} is not of type 'array'" |
| 79 |
}, |
| 80 |
"num_sub_errors": 4, |
| 81 |
"sub_errors": [ |
| 82 |
{ |
| 83 |
"path": "$", |
| 84 |
"message": "{'foo': 'bar'} is not of type 'array'" |
| 85 |
}, |
| 86 |
{ |
| 87 |
"path": "$", |
| 88 |
"message": "Additional properties are not allowed ('foo' was unexpected)" |
| 89 |
}, |
| 90 |
{ |
| 91 |
"path": "$", |
| 92 |
"message": "{'foo': 'bar'} is not valid under any of the given schemas" |
| 93 |
}, |
| 94 |
{ |
| 95 |
"path": "$", |
| 96 |
"message": "'collections' is a required property" |
| 97 |
}, |
| 98 |
{ |
| 99 |
"path": "$", |
| 100 |
"message": "'roles' is a required property" |
| 101 |
} |
| 102 |
] |
| 103 |
} |
| 104 |
], |
| 105 |
"parse_errors": [] |
| 106 |
} |
| 107 |
``` |