summaryrefslogtreecommitdiffstats
path: root/test/schemas/negative_test/playbooks/vars/list.yml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/schemas/negative_test/playbooks/vars/list.yml3
-rw-r--r--test/schemas/negative_test/playbooks/vars/list.yml.md77
2 files changed, 80 insertions, 0 deletions
diff --git a/test/schemas/negative_test/playbooks/vars/list.yml b/test/schemas/negative_test/playbooks/vars/list.yml
new file mode 100644
index 0000000..909a4d7
--- /dev/null
+++ b/test/schemas/negative_test/playbooks/vars/list.yml
@@ -0,0 +1,3 @@
+# invalid vars file, as sequence is not allowed
+- foo
+- bar
diff --git a/test/schemas/negative_test/playbooks/vars/list.yml.md b/test/schemas/negative_test/playbooks/vars/list.yml.md
new file mode 100644
index 0000000..e2c9bf5
--- /dev/null
+++ b/test/schemas/negative_test/playbooks/vars/list.yml.md
@@ -0,0 +1,77 @@
+# ajv errors
+
+```json
+[
+ {
+ "instancePath": "",
+ "keyword": "type",
+ "message": "must be object",
+ "params": {
+ "type": "object"
+ },
+ "schemaPath": "#/anyOf/0/type"
+ },
+ {
+ "instancePath": "",
+ "keyword": "type",
+ "message": "must be string",
+ "params": {
+ "type": "string"
+ },
+ "schemaPath": "#/anyOf/1/type"
+ },
+ {
+ "instancePath": "",
+ "keyword": "type",
+ "message": "must be null",
+ "params": {
+ "type": "null"
+ },
+ "schemaPath": "#/anyOf/2/type"
+ },
+ {
+ "instancePath": "",
+ "keyword": "anyOf",
+ "message": "must match a schema in anyOf",
+ "params": {},
+ "schemaPath": "#/anyOf"
+ }
+]
+```
+
+# check-jsonschema
+
+stdout:
+
+```json
+{
+ "status": "fail",
+ "errors": [
+ {
+ "filename": "negative_test/playbooks/vars/list.yml",
+ "path": "$",
+ "message": "['foo', 'bar'] is not valid under any of the given schemas",
+ "has_sub_errors": true,
+ "best_match": {
+ "path": "$",
+ "message": "['foo', 'bar'] is not of type 'object'"
+ },
+ "sub_errors": [
+ {
+ "path": "$",
+ "message": "['foo', 'bar'] is not of type 'object'"
+ },
+ {
+ "path": "$",
+ "message": "['foo', 'bar'] is not of type 'string'"
+ },
+ {
+ "path": "$",
+ "message": "['foo', 'bar'] is not of type 'null'"
+ }
+ ]
+ }
+ ],
+ "parse_errors": []
+}
+```