Skip to content

Commit 02f95d1

Browse files
committed
[244] Update the test schema with a way for the data to be tested as a schema
Added "isAllSchemas" to each test set and "isSchema" to each test. Another possible name might be "doTestDataAsSchema".
1 parent 1fbc7a7 commit 02f95d1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test-schema.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
"schema": {
2323
"description": "This should be a valid schema. This should be a ref to a meta-schema if schema keywords need testing."
2424
},
25+
"isAllSchemas": {
26+
"description": "If set to true then every \"data\" instance in \"tests\" will be tested as a schema. This is equivalent to setting every test's \"isSchema\" to true.",
27+
"type": "boolean",
28+
"default": false
29+
},
2530
"tests": {
2631
"description": "A set of related tests all using the same schema",
2732
"type": "array",
@@ -71,7 +76,14 @@
7176
"description": "Any additional comments about the test",
7277
"type": "string"
7378
},
74-
"data": {},
79+
"isSchema": {
80+
"description": "If set to true, then the data is meant to be loaded as a schema. This enables tests for things that the schema in \"schema\" is unable to syntactically or semantically cover.",
81+
"type": "boolean",
82+
"default": false
83+
},
84+
"data": {
85+
"description": "This is the instance to be validated against the schema in \"schema\"."
86+
},
7587
"valid": { "type": "boolean" },
7688
"output": {
7789
"type": "object",

0 commit comments

Comments
 (0)