Skip to content

Commit d5e34a0

Browse files
committed
Issue-949: Fixing inconsistencies in output schema
1. Changing "oneOf" to "anyOf", because basic, detailed and verbose have the same definition, oneOf would fail validation. 2. Adding "error" keyword and making either "error" or "errors" required in case "valid" is false.
1 parent 378aae2 commit d5e34a0

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

output/schema.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"$id": "https://json-schema.org/draft/2019-09/output/schema",
44
"description": "A schema that validates the minimum requirements for validation output",
55

6-
"oneOf": [
6+
"anyOf": [
77
{ "$ref": "#/$defs/flag" },
88
{ "$ref": "#/$defs/basic" },
99
{ "$ref": "#/$defs/detailed" },
@@ -25,6 +25,9 @@
2525
"type": "string",
2626
"format": "uri-reference"
2727
},
28+
"error": {
29+
"type": "string"
30+
},
2831
"errors": {
2932
"$ref": "#/$defs/outputUnitArray"
3033
},
@@ -41,7 +44,14 @@
4144
}
4245
},
4346
"then": {
44-
"required": [ "errors" ]
47+
"oneOf": [
48+
{
49+
"required": [ "error" ]
50+
},
51+
{
52+
"required": [ "errors" ]
53+
}
54+
]
4555
}
4656
},
4757
{

0 commit comments

Comments
 (0)