-
-
Notifications
You must be signed in to change notification settings - Fork 356
Extract output to its own spec #1429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
dea8344
fc59a3e
4e9e93b
db1d0bc
39ebe11
d0e00c1
b9b9848
33f84c5
076790d
4e7be40
ef14ca7
1d83efb
3e81674
2a0d4c7
8270653
69711aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2071,34 +2071,44 @@ Omitting this keyword has the same assertion behavior as an empty schema. | |
|
|
||
| ## Output Formatting {#output} | ||
|
|
||
| In order to foster increased usability and interoperability, implementations SHOULD adhere to well-defined output formats. | ||
| In order to foster increased usability and interoperability, implementations | ||
| SHOULD adhere to well-defined output formats. | ||
|
|
||
| Because JSON Schema has multiple uses cases, and those uses cases have different intended consumers, this specification defers the details of any output formats to other documents. Implementations are encouraged to support multiple output formats as required by their target user base. | ||
| Because JSON Schema has multiple uses cases, and those uses cases have different | ||
| intended consumers, this specification defers the details of any output formats | ||
| to other documents. Implementations are encouraged to support multiple output | ||
| formats as required by their target user base. | ||
|
|
||
| The scope of this section, therefore, is limited to defining common terms that SHOULD be used in JSON Schema output specifications in order to align the vernacular across differing formats. Output specifications which use this information MUST use this terminology to describe it. Conversely, output specifications which use these terms MUST maintain their meaning. | ||
| The scope of this section, therefore, is limited to defining common terms that | ||
| SHOULD be used in JSON Schema output specifications in order to align the | ||
| vernacular across differing formats. Output specifications which use this | ||
| information MUST use this terminology to describe it. Conversely, output | ||
| specifications which use these terms MUST maintain their meaning. | ||
|
|
||
| ### Evaluation path | ||
|
|
||
| The evaluation path is the set of keys, starting from the schema root, through which evaluation passes to reach the schema object that produced a specific result. | ||
| The value MUST be expressed as a JSON Pointer, and it MUST include any by-reference | ||
| applicators such as `$ref` or `$dynamicRef`. | ||
| The evaluation path is the set of keys, starting from the schema root, through | ||
| which evaluation passes to reach the schema object that produced a specific | ||
| result. The value MUST be expressed as a JSON Pointer, and it MUST include any | ||
| by-reference applicators such as `$ref` or `$dynamicRef`. | ||
|
|
||
| ``` | ||
| /properties/width/$ref/allOf/1 | ||
| ``` | ||
|
|
||
| Note that this pointer may not be resolvable on the root schema by the normal JSON Pointer process. | ||
| It is intended as an indication of the traversal path only. | ||
| Note that this pointer may not be resolvable on the root schema by the normal | ||
| JSON Pointer process. It is intended as an indication of the traversal path | ||
| only. | ||
|
|
||
| When represented in JSON, the key for this information MUST be "evaluationPath". | ||
|
|
||
| ### Schema Location | ||
|
|
||
| The schema location is the absolute, dereferenced location of the schema object that produced a result. | ||
| The value MUST be expressed using the canonical IRI of the relevant | ||
| schema resource plus a JSON Pointer fragment that indicates the schema object | ||
| that produced the output. It MUST NOT include by-reference applicators such as | ||
| `$ref` or `$dynamicRef`.[^14] | ||
| The schema location is the absolute, dereferenced location of the schema object | ||
gregsdennis marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| that produced a result. The value MUST be expressed using the canonical IRI of | ||
gregsdennis marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| the relevant schema resource plus a JSON Pointer fragment that indicates the | ||
| schema object that produced the output. It MUST NOT include by-reference | ||
| applicators such as `$ref` or `$dynamicRef`.[^14] | ||
|
||
|
|
||
| [^14]: Note that "absolute" here is in the sense of "absolute filesystem path" | ||
| (meaning the complete location) rather than the "absolute-IRI" terminology from | ||
gregsdennis marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
@@ -2113,36 +2123,44 @@ When represented in JSON, the key for this information MUST be "schemaLocation". | |
|
|
||
| ### Instance Location | ||
|
|
||
| The instance location is the location of the JSON value within the root instance being validated. | ||
| The value MUST be expressed as a JSON Pointer. | ||
| The instance location is the location of the JSON value within the root instance | ||
| being validated. The value MUST be expressed as a JSON Pointer. | ||
jdesrosiers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| When represented in JSON, the key for this information MUST be "instanceLocation". | ||
| When represented in JSON, the key for this information MUST be | ||
| "instanceLocation". | ||
|
|
||
| ### Errors | ||
|
|
||
| Errors are textual representations of individual validation failures, often intended for human consumers. This specification contains no requirements for the content of these errors. | ||
| Errors are textual representations of individual validation failures, often | ||
| intended for human consumers. This specification contains no requirements for | ||
| the content of these errors. | ||
|
|
||
| When represented in JSON, the key for this information MUST be "errors". | ||
|
|
||
| ### Annotations | ||
|
|
||
| Many keywords are defined to produce annotations, whether intended for inter-keyword communication (e.g. between `properties` and `unevaluatedProperties`) or for application consumption (e.g. `title` or `readOnly`). Annotation values may be of any type and are defined by the keywords that produced them. | ||
| Many keywords are defined to produce annotations, whether intended for | ||
| inter-keyword communication (e.g. between `properties` and | ||
| `unevaluatedProperties`) or for application consumption (e.g. `title` or | ||
| `readOnly`). Annotation values may be of any type and are defined by the | ||
| keywords that produced them. | ||
|
Comment on lines
+2134
to
+2138
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be useful to have a link in here somewhere to the section that defines annotations. |
||
|
|
||
| When represented in JSON, the key for this information MUST be "annotations". | ||
|
|
||
| ### Dropped Annotations | ||
|
|
||
| A dropped annotation is any annotation produced and subsequently dropped by the evaluation due to an | ||
| unsuccessful validation result of the containing subschema. | ||
| This information MAY be included if the validation result of the containing subschema was unsuccessful. | ||
| It MUST NOT be included if the local validation result of the containing | ||
| subschema was successful. | ||
| A dropped annotation is any annotation produced and subsequently dropped by the | ||
| evaluation due to an unsuccessful validation result of the containing subschema. | ||
| This information MAY be included if the validation result of the containing | ||
| subschema was unsuccessful. It MUST NOT be included if the local validation | ||
| result of the containing subschema was successful. | ||
|
|
||
| Implementations that wish to provide dropped annotations MUST NOT provide them as | ||
| their default behavior. Dropped annotations MUST only be included when the | ||
| Implementations that wish to provide dropped annotations MUST NOT provide them | ||
| as their default behavior. Dropped annotations MUST only be included when the | ||
| implementations is explicitly configured to do so. | ||
|
|
||
| When represented in JSON, the key for this information MUST be "droppedAnnotations". | ||
| When represented in JSON, the key for this information MUST be | ||
| "droppedAnnotations". | ||
|
|
||
| ## Security Considerations {#security} | ||
|
|
||
|
|
||