This repository was archived by the owner on Sep 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtest_file_schema.json
More file actions
63 lines (63 loc) · 2.33 KB
/
test_file_schema.json
File metadata and controls
63 lines (63 loc) · 2.33 KB
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
{
"id": "https://raw.githubusercontent.com/MailOnline/json-schema-test/master/test_file_schema.json",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "schema for the test file (multiple test sets)",
"definitions": {
"nonEmptyString": {
"id": "#nonEmptyString",
"type": "string",
"minLength": 1
},
"schema": {
"id": "#schema",
"anyOf": [
{ "$ref": "http://json-schema.org/draft-04/schema#" },
{ "$ref": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#" }
]
}
},
"type": "array",
"minItems": 1,
"items": {
"description": "set of tests for one schema",
"type": "object",
"required": [ "description", "tests" ],
"oneOf": [
{ "required": [ "schema" ] },
{ "required": [ "schemas" ] }
],
"properties": {
"description": { "$ref": "#nonEmptyString" },
"schema": { "$ref": "#schema" },
"schemas": {
"type": "array",
"minItems": 2,
"items": { "$ref": "#schema" }
},
"tests": {
"type": "array",
"minItems": 1,
"items": {
"description": "one test for the schema, should either have 'valid' or 'error' property but not both (error used for async validation only)",
"type": "object",
"required": [ "description", "data" ],
"properties": {
"description": { "$ref": "#nonEmptyString" },
"data": {
"description": "data sample, can be any type"
},
"valid": {
"description": "determines whether data sample should be valid according to the schema",
"type": "boolean"
},
"error": { "$ref": "#nonEmptyString" }
},
"oneOf": [
{ "required": [ "valid" ] },
{ "required": [ "error" ] }
]
}
}
}
}
}