You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jsonschema-validation-output-machines.md
+19-14Lines changed: 19 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -12,25 +12,25 @@ There are no requirements on the form of IRI itself, except that it MUST be abso
12
12
13
13
JSON Schema output is defined using the JSON Schema data instance model as described in [JSON Schema](#json-schema) "Instance Data Model". Implementations MAY deviate from this in their internal modelling, as supported by their specific languages and platforms, however it is RECOMMENDED that the output be convertible to the JSON format defined herein via serialization or other means.
14
14
15
-
## Output Formats
16
-
17
-
This specification defines three output formats. See [Output Structure]{#output-structure} for the requirements of each format.
18
-
19
-
-**Flag** - A boolean which simply indicates the overall validation result with no further details.
20
-
-**List** - Provides validation information in a flat list structure.
21
-
-**Hierarchical** - Provides validation information in a hierarchical structure that follows the evaluation paths generated while processing the schema.
15
+
## Minimum Information
22
16
23
-
An implementation MUST provide the "flag" format and SHOULD provide at least one of the "list" or "hierarchical" formats. Implementations SHOULD specify in their documentation which formats they support.
17
+
Beyond the simplistic "flag" output, additional information is useful to aid in debugging evaluation of an instance by a schema.
24
18
25
-
## Minimum Information
19
+
The output of a subschema validation is considered an "output unit." The contents of each output unit is specified by this section.
26
20
27
-
Beyond the simplistic "flag" output, additional information is useful to aid in debugging evaluation of an instance by a schema. Each sub-result MUST contain the [validation result](#validation-result) for the associated subschema as well as the following information defined by [JSON Schema](#json-schema) "Output Formatting".
21
+
Each output unit MUST contain the [validation result](#validation-result) for the associated subschema as well as the following information defined by [JSON Schema](#json-schema) "Output Formatting":
28
22
29
23
- Evaluation Path
30
24
- Schema Location
31
25
- Instance Location
32
26
33
-
A single object that contains all of these components is considered an "output unit."
27
+
The following information MAY be included conditionally:
28
+
29
+
- When subschema validation has succeeded
30
+
- Annotations
31
+
- When subschema validation has failed
32
+
- Errors
33
+
- Dropped Annotations
34
34
35
35
Implementations MAY elect to provide additional information.
36
36
@@ -50,14 +50,19 @@ For "hierarchical", this property will contain results in a tree structure where
50
50
51
51
The sequence of output units within this list is not specified and MAY be determined by the implementation. Sets of output units are considered equivalent if they contain the same units, in any order.
52
52
53
+
<!-- Not sure if it's necessary to mention equivalence. -->
54
+
53
55
The JSON key for these additional results is `details`.
54
56
55
57
## Output Structure {#output-structure}
56
58
57
-
The output MUST be an object containing a boolean property named `valid`. When additional information about the result is required, the output MUST also contain `details` as described below.
59
+
This specification defines three output formats.
58
60
59
-
-`valid` - a boolean value indicating the overall validation success or failure
60
-
-`details` - the collection of results produced by subschemas
61
+
-**Flag** - A boolean which simply indicates the overall validation result with no further details.
62
+
-**List** - Provides validation information in a flat list structure.
63
+
-**Hierarchical** - Provides validation information in a hierarchical structure that follows the evaluation paths generated while processing the schema.
64
+
65
+
An implementation MUST provide the "flag" format and SHOULD provide at least one of the "list" or "hierarchical" formats. Implementations SHOULD specify in their documentation which formats they support.
61
66
62
67
For these examples, the following schema and instances will be used.
0 commit comments