Debian Codegraph @

share/draft2020-12/output/schema.json

raw
1 {
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://json-schema.org/draft/2020-12/output/schema",
4 "description": "A schema that validates the minimum requirements for validation output",
5
6 "anyOf": [
7 { "$ref": "#/$defs/flag" },
8 { "$ref": "#/$defs/basic" },
9 { "$ref": "#/$defs/detailed" },
10 { "$ref": "#/$defs/verbose" }
11 ],
12 "$defs": {
13 "outputUnit":{
14 "properties": {
15 "valid": { "type": "boolean" },
16 "keywordLocation": {
17 "type": "string",
18 "format": "json-pointer"
19 },
20 "absoluteKeywordLocation": {
21 "type": "string",
22 "format": "uri"
23 },
24 "instanceLocation": {
25 "type": "string",
26 "format": "json-pointer"
27 },
28 "error": {
29 "type": "string"
30 },
31 "annotation": true,
32 "errors": {
33 "$ref": "#/$defs/outputUnitArray"
34 },
35 "annotations": {
36 "$ref": "#/$defs/outputUnitArray"
37 }
38 },
39 "required": [ "valid", "keywordLocation", "instanceLocation" ],
40 "allOf": [
41 {
42 "if": {
43 "properties": {
44 "valid": { "const": false }
45 }
46 },
47 "then": {
48 "anyOf": [
49 {
50 "required": [ "error" ]
51 },
52 {
53 "required": [ "errors" ]
54 }
55 ]
56 }
57 },
58 {
59 "if": {
60 "anyOf": [
61 {
62 "properties": {
63 "keywordLocation": {
64 "pattern": "/\\$ref/"
65 }
66 }
67 },
68 {
69 "properties": {
70 "keywordLocation": {
71 "pattern": "/\\$dynamicRef/"
72 }
73 }
74 }
75 ]
76 },
77 "then": {
78 "required": [ "absoluteKeywordLocation" ]
79 }
80 }
81 ]
82 },
83 "outputUnitArray": {
84 "type": "array",
85 "items": { "$ref": "#/$defs/outputUnit" }
86 },
87 "flag": {
88 "properties": {
89 "valid": { "type": "boolean" }
90 },
91 "required": [ "valid" ]
92 },
93 "basic": { "$ref": "#/$defs/outputUnit" },
94 "detailed": { "$ref": "#/$defs/outputUnit" },
95 "verbose": { "$ref": "#/$defs/outputUnit" }
96 }
97 }