|
1 | 1 | { |
2 | 2 | "$schema": "http://json-schema.org/draft-04/schema#", |
| 3 | + "description": "Schema for tests", |
| 4 | + "type": "array", |
| 5 | + "items": { |
| 6 | + "type": "object", |
| 7 | + "required": [ "description", "schema", "tests" ], |
| 8 | + "properties": { |
| 9 | + "id": { |
| 10 | + "description": "Uniquely identifies a set of tests", |
| 11 | + "type": "string", |
| 12 | + "format": "uri" |
| 13 | + }, |
| 14 | + "description": { "type": "string" }, |
| 15 | + "schema": {}, |
| 16 | + "tests": { |
| 17 | + "description": "A set of related tests all using the same schema", |
| 18 | + "type": "array", |
| 19 | + "items": { "$ref": "#/definitions/test" }, |
| 20 | + "minItems": 1 |
| 21 | + } |
| 22 | + }, |
| 23 | + "additionalProperties": false, |
| 24 | + "minItems": 1 |
| 25 | + }, |
3 | 26 | "definitions": { |
4 | 27 | "outputItem": { |
5 | 28 | "type": "object", |
6 | 29 | "properties": { |
7 | | - "valid": {"type": "boolean"}, |
8 | | - "keywordLocation": {"type": "string"}, |
| 30 | + "valid": { "type": "boolean" }, |
| 31 | + "keywordLocation": { "type": "string" }, |
9 | 32 | "absoluteKeywordLocation": { |
10 | 33 | "type": "string", |
11 | 34 | "format": "uri" |
12 | 35 | }, |
13 | | - "instanceLocation": {"type": "string"}, |
| 36 | + "instanceLocation": { "type": "string" }, |
14 | 37 | "annotations": { |
15 | 38 | "type": "array", |
16 | | - "items": {"$ref": "#/definitions/outputItem"} |
| 39 | + "items": { "$ref": "#/definitions/outputItem" } |
17 | 40 | }, |
18 | 41 | "errors": { |
19 | 42 | "type": "array", |
20 | | - "items": {"$ref": "#/definitions/outputItem"} |
| 43 | + "items": { "$ref": "#/definitions/outputItem" } |
21 | 44 | } |
22 | 45 | } |
23 | | - } |
24 | | - }, |
25 | | - "type": "array", |
26 | | - "items": { |
27 | | - "type": "object", |
28 | | - "required": ["description", "schema", "tests"], |
29 | | - "properties": { |
30 | | - "description": {"type": "string"}, |
31 | | - "schema": {}, |
32 | | - "tests": { |
33 | | - "type": "array", |
34 | | - "items": { |
| 46 | + }, |
| 47 | + "test": { |
| 48 | + "description": "A single test", |
| 49 | + "type": "object", |
| 50 | + "required": [ "description", "data", "valid" ], |
| 51 | + "properties": { |
| 52 | + "id": { |
| 53 | + "description": "Uniquely identifies a single test", |
| 54 | + "type": "string", |
| 55 | + "format": "uri" |
| 56 | + }, |
| 57 | + "description": { "type": "string" }, |
| 58 | + "data": {}, |
| 59 | + "valid": { "type": "boolean" }, |
| 60 | + "output": { |
35 | 61 | "type": "object", |
36 | | - "required": ["description", "data", "valid"], |
| 62 | + "required": [ "basic", "detailed", "verbose" ], |
37 | 63 | "properties": { |
38 | | - "description": {"type": "string"}, |
39 | | - "data": {}, |
40 | | - "valid": {"type": "boolean"}, |
41 | | - "output": { |
42 | | - "type": "object", |
43 | | - "properties": { |
44 | | - "basic": {"$ref": "#/definitions/outputItem"}, |
45 | | - "detailed": {"$ref": "#/definitions/outputItem"}, |
46 | | - "verbose": {"$ref": "#/definitions/outputItem"} |
47 | | - }, |
48 | | - "required": ["basic", "detailed", "verbose"] |
49 | | - } |
50 | | - }, |
51 | | - "additionalProperties": false |
52 | | - }, |
53 | | - "minItems": 1 |
54 | | - } |
55 | | - }, |
56 | | - "additionalProperties": false, |
57 | | - "minItems": 1 |
| 64 | + "basic": { "$ref": "#/definitions/outputItem" }, |
| 65 | + "detailed": { "$ref": "#/definitions/outputItem" }, |
| 66 | + "verbose": { "$ref": "#/definitions/outputItem" } |
| 67 | + } |
| 68 | + } |
| 69 | + }, |
| 70 | + "additionalProperties": false |
| 71 | + } |
58 | 72 | } |
59 | 73 | } |
0 commit comments