|
1 | 1 | {
|
2 |
| - "$schema": "http://json-schema.org/draft-06/schema#", |
3 |
| - "description": "Schema for tests", |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "description": "A schema for files contained within this suite", |
| 4 | + |
4 | 5 | "type": "array",
|
| 6 | + "minItems": 1, |
5 | 7 | "items": {
|
| 8 | + "description": "An individual test case, containing multiple tests of a single schema's behavior", |
| 9 | + |
6 | 10 | "type": "object",
|
7 | 11 | "required": [ "description", "schema", "tests" ],
|
8 | 12 | "properties": {
|
9 |
| - "id": { |
10 |
| - "description": "Uniquely identifies a set of tests", |
11 |
| - "type": "string", |
12 |
| - "format": "uri" |
13 |
| - }, |
14 | 13 | "description": {
|
15 |
| - "description": "The test set description", |
| 14 | + "description": "The test case description", |
16 | 15 | "type": "string"
|
17 | 16 | },
|
18 | 17 | "comment": {
|
19 |
| - "description": "Any additional comments about the test set", |
| 18 | + "description": "Any additional comments about the test case", |
20 | 19 | "type": "string"
|
21 | 20 | },
|
22 | 21 | "schema": {
|
23 |
| - "description": "This should be a valid schema. This should be a ref to a meta-schema if schema keywords need testing." |
| 22 | + "description": "A valid JSON Schema (one written for the corresponding version directory that the file sits within)." |
24 | 23 | },
|
25 | 24 | "tests": {
|
26 | 25 | "description": "A set of related tests all using the same schema",
|
|
29 | 28 | "minItems": 1
|
30 | 29 | }
|
31 | 30 | },
|
32 |
| - "additionalProperties": false, |
33 |
| - "minItems": 1 |
| 31 | + "additionalProperties": false |
34 | 32 | },
|
| 33 | + |
35 | 34 | "definitions": {
|
36 |
| - "outputItem": { |
37 |
| - "type": "object", |
38 |
| - "properties": { |
39 |
| - "valid": { "type": "boolean" }, |
40 |
| - "keywordLocation": { "type": "string" }, |
41 |
| - "absoluteKeywordLocation": { |
42 |
| - "type": "string", |
43 |
| - "format": "uri" |
44 |
| - }, |
45 |
| - "instanceLocation": { "type": "string" }, |
46 |
| - "annotations": { |
47 |
| - "type": "array", |
48 |
| - "items": { "$ref": "#/definitions/outputItem" } |
49 |
| - }, |
50 |
| - "errors": { |
51 |
| - "type": "array", |
52 |
| - "items": { "$ref": "#/definitions/outputItem" } |
53 |
| - } |
54 |
| - } |
55 |
| - }, |
56 | 35 | "test": {
|
57 | 36 | "description": "A single test",
|
| 37 | + |
58 | 38 | "type": "object",
|
59 | 39 | "required": [ "description", "data", "valid" ],
|
60 | 40 | "properties": {
|
61 |
| - "id": { |
62 |
| - "description": "Uniquely identifies a single test", |
63 |
| - "type": "string", |
64 |
| - "format": "uri" |
65 |
| - }, |
66 | 41 | "description": {
|
67 |
| - "description": "The test description", |
| 42 | + "description": "The test description, briefly explaining which behavior it exercises", |
68 | 43 | "type": "string"
|
69 | 44 | },
|
70 | 45 | "comment": {
|
71 | 46 | "description": "Any additional comments about the test",
|
72 | 47 | "type": "string"
|
73 | 48 | },
|
74 | 49 | "data": {
|
75 |
| - "description": "This is the instance to be validated against the schema in \"schema\"." |
| 50 | + "description": "The instance which should be validated against the schema in \"schema\"." |
| 51 | + }, |
| 52 | + "valid": { |
| 53 | + "description": "Whether the validation process of this instance should consider the instance valid or not", |
| 54 | + "type": "boolean" |
76 | 55 | },
|
77 |
| - "valid": { "type": "boolean" }, |
78 | 56 | "output": {
|
| 57 | + "description": "Reserved for use with the JSON Schema output format", |
| 58 | + |
79 | 59 | "type": "object",
|
80 | 60 | "required": [ "basic", "detailed", "verbose" ],
|
81 | 61 | "properties": {
|
|
86 | 66 | }
|
87 | 67 | },
|
88 | 68 | "additionalProperties": false
|
| 69 | + }, |
| 70 | + |
| 71 | + "outputItem": { |
| 72 | + "type": "object", |
| 73 | + "properties": { |
| 74 | + "valid": { "type": "boolean" }, |
| 75 | + "keywordLocation": { "type": "string" }, |
| 76 | + "absoluteKeywordLocation": { |
| 77 | + "type": "string", |
| 78 | + "format": "uri" |
| 79 | + }, |
| 80 | + "instanceLocation": { "type": "string" }, |
| 81 | + "annotations": { |
| 82 | + "type": "array", |
| 83 | + "items": { "$ref": "#/definitions/outputItem" } |
| 84 | + }, |
| 85 | + "errors": { |
| 86 | + "type": "array", |
| 87 | + "items": { "$ref": "#/definitions/outputItem" } |
| 88 | + } |
| 89 | + } |
89 | 90 | }
|
90 | 91 | }
|
91 | 92 | }
|
0 commit comments