|
6 | 6 | "anyOf": [ |
7 | 7 | { "$ref": "#/$defs/flag" }, |
8 | 8 | { "$ref": "#/$defs/basic" }, |
9 | | - { "$ref": "#/$defs/detailed" }, |
10 | | - { "$ref": "#/$defs/verbose" } |
| 9 | + { "$ref": "#/$defs/hierarchical" } |
11 | 10 | ], |
12 | 11 | "$defs": { |
13 | 12 | "outputUnit":{ |
14 | 13 | "properties": { |
15 | 14 | "valid": { "type": "boolean" }, |
16 | | - "keywordLocation": { |
| 15 | + "evaluationPath": { |
17 | 16 | "type": "string", |
18 | 17 | "format": "json-pointer" |
19 | 18 | }, |
20 | | - "absoluteKeywordLocation": { |
| 19 | + "schemaLocation": { |
21 | 20 | "type": "string", |
22 | 21 | "format": "uri" |
23 | 22 | }, |
24 | 23 | "instanceLocation": { |
25 | 24 | "type": "string", |
26 | 25 | "format": "json-pointer" |
27 | 26 | }, |
28 | | - "error": { |
29 | | - "type": "string" |
30 | | - }, |
31 | | - "errors": { |
| 27 | + "nested": { |
32 | 28 | "$ref": "#/$defs/outputUnitArray" |
33 | 29 | }, |
34 | 30 | "annotations": { |
35 | | - "$ref": "#/$defs/outputUnitArray" |
| 31 | + "type": "object", |
| 32 | + "additionalProperties": true |
| 33 | + }, |
| 34 | + "errors": { |
| 35 | + "type": "object", |
| 36 | + "additionalProperties": { "type": "string" } |
36 | 37 | } |
37 | 38 | }, |
38 | | - "required": [ "valid", "keywordLocation", "instanceLocation" ], |
| 39 | + "required": [ "valid", "evaluationPath", "schemaLocation", "instanceLocation" ], |
39 | 40 | "allOf": [ |
40 | 41 | { |
41 | 42 | "if": { |
| 43 | + "required": [ "errors" ] |
| 44 | + }, |
| 45 | + "then": { |
42 | 46 | "properties": { |
43 | 47 | "valid": { "const": false } |
44 | 48 | } |
45 | | - }, |
46 | | - "then": { |
47 | | - "anyOf": [ |
48 | | - { |
49 | | - "required": [ "error" ] |
50 | | - }, |
51 | | - { |
52 | | - "required": [ "errors" ] |
53 | | - } |
54 | | - ] |
55 | 49 | } |
56 | 50 | }, |
57 | 51 | { |
58 | 52 | "if": { |
59 | | - "anyOf": [ |
60 | | - { |
61 | | - "properties": { |
62 | | - "keywordLocation": { |
63 | | - "pattern": "/\\$ref/" |
64 | | - } |
65 | | - } |
66 | | - }, |
67 | | - { |
68 | | - "properties": { |
69 | | - "keywordLocation": { |
70 | | - "pattern": "/\\$dynamicRef/" |
71 | | - } |
72 | | - } |
73 | | - } |
74 | | - ] |
| 53 | + "required": [ "annotations" ] |
75 | 54 | }, |
76 | 55 | "then": { |
77 | | - "required": [ "absoluteKeywordLocation" ] |
| 56 | + "properties": { |
| 57 | + "valid": { "const": true } |
| 58 | + } |
78 | 59 | } |
79 | 60 | } |
80 | 61 | ] |
|
89 | 70 | }, |
90 | 71 | "required": [ "valid" ] |
91 | 72 | }, |
92 | | - "basic": { "$ref": "#/$defs/outputUnit" }, |
93 | | - "detailed": { "$ref": "#/$defs/outputUnit" }, |
94 | | - "verbose": { "$ref": "#/$defs/outputUnit" } |
| 73 | + "basic": { |
| 74 | + "properties": { |
| 75 | + "valid": { "type": "boolean" }, |
| 76 | + "nested": { |
| 77 | + "$ref": "#/$defs/outputUnitArray" |
| 78 | + } |
| 79 | + }, |
| 80 | + "required": [ "valid", "nested" ] |
| 81 | + }, |
| 82 | + "hierarchical": { "$ref": "#/$defs/outputUnit" } |
95 | 83 | } |
96 | 84 | } |
0 commit comments