Skip to content

Commit ddd5f35

Browse files
committed
add output unit pruning
1 parent 0818fec commit ddd5f35

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

json-schema-output.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,9 @@ For convenience, JSON Schema has been provided to validate output generated by i
571571

572572
For various reasons, including human readability and performance during evaluation, a user may desire to omit certain details from the output. To address this, implementations MAY provide filtering output information.
573573

574-
This section defines several RECOMMENDED approaches to filtering, however implementations MAY choose to provide these feature in a way that suits them and their users best.
574+
This section defines several RECOMMENDED approaches to filtering, however implementations MAY choose to provide these features in a way that suits them and their users best.
575575

576-
For those implementations which support filtering behaviors, it MUST be configurable and disabled by default.
576+
For those implementations which support filtering behaviors, the behaviors MUST be configurable and disabled by default.
577577

578578
### Annotation Filtering
579579

@@ -590,3 +590,14 @@ For an "ignore" list, an implementation MUST NOT include in the output those ann
590590
Some implementations may be annotation-driven. That is, the evaluation of some keywords depends on the annotation results of other keywords. For example, which properties are seen by `additionalProperties` can be determined by looking at the annotation results of `properties` and `patternProperties`.
591591

592592
For these implementations, the annotation results of these dependent keywords must still be collected for proper evaluation. However, these annotations MUST NOT be included in the output unless they are configured accordingly.
593+
594+
### Output Unit Pruning
595+
596+
In many cases, the output structures defined herein produce output units for more than is necessary to identify evaluation issues. Implementations SHOULD provide a mechanism which removes unimportant output units from the final structure in order to highlight those units which impact the final result.
597+
598+
Reasons to omit output units may include, but are not limited to:
599+
600+
- Child output units whose validation result does not impact the validation result of the parent. For example, a subschema of an `anyOf` which has a false validation result when there exists a sibling subschema with a true validation result.
601+
- Child output units which have a true validation result but contain no annotations.
602+
603+
Implementations which provide this behavior SHOULD provide configuration mechanisms appropriate for their users' needs.

0 commit comments

Comments
 (0)