|
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 single test", |
| 11 | + "type": "string", |
| 12 | + "format": "uri" |
| 13 | + }, |
| 14 | + "description": { "type": "string" }, |
| 15 | + "schema": {}, |
| 16 | + "tests": { |
| 17 | + "type": "array", |
| 18 | + "items": { "$ref": "#/definitions/test" }, |
| 19 | + "minItems": 1 |
| 20 | + } |
| 21 | + }, |
| 22 | + "additionalProperties": false, |
| 23 | + "minItems": 1 |
| 24 | + }, |
3 | 25 | "definitions": {
|
4 | 26 | "outputItem": {
|
5 | 27 | "type": "object",
|
6 | 28 | "properties": {
|
7 |
| - "valid": {"type": "boolean"}, |
8 |
| - "keywordLocation": {"type": "string"}, |
| 29 | + "valid": { "type": "boolean" }, |
| 30 | + "keywordLocation": { "type": "string" }, |
9 | 31 | "absoluteKeywordLocation": {
|
10 | 32 | "type": "string",
|
11 | 33 | "format": "uri"
|
12 | 34 | },
|
13 |
| - "instanceLocation": {"type": "string"}, |
| 35 | + "instanceLocation": { "type": "string" }, |
14 | 36 | "annotations": {
|
15 | 37 | "type": "array",
|
16 |
| - "items": {"$ref": "#/definitions/outputItem"} |
| 38 | + "items": { "$ref": "#/definitions/outputItem" } |
17 | 39 | },
|
18 | 40 | "errors": {
|
19 | 41 | "type": "array",
|
20 |
| - "items": {"$ref": "#/definitions/outputItem"} |
| 42 | + "items": { "$ref": "#/definitions/outputItem" } |
21 | 43 | }
|
22 | 44 | }
|
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": { |
| 45 | + }, |
| 46 | + "test": { |
| 47 | + "description": "A single test", |
| 48 | + "type": "object", |
| 49 | + "required": [ "description", "data", "valid" ], |
| 50 | + "properties": { |
| 51 | + "description": { "type": "string" }, |
| 52 | + "data": {}, |
| 53 | + "valid": { "type": "boolean" }, |
| 54 | + "output": { |
35 | 55 | "type": "object",
|
36 |
| - "required": ["description", "data", "valid"], |
| 56 | + "required": [ "basic", "detailed", "verbose" ], |
37 | 57 | "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 |
| 58 | + "basic": { "$ref": "#/definitions/outputItem" }, |
| 59 | + "detailed": { "$ref": "#/definitions/outputItem" }, |
| 60 | + "verbose": { "$ref": "#/definitions/outputItem" } |
| 61 | + } |
| 62 | + } |
| 63 | + }, |
| 64 | + "additionalProperties": false |
| 65 | + } |
58 | 66 | }
|
59 | 67 | }
|
0 commit comments