Skip to content

Commit 0818fec

Browse files
committed
add annotation filtering
1 parent 73ef1c6 commit 0818fec

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

json-schema-output.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,3 +566,27 @@ The location properties of the root output unit MAY be omitted.
566566
## Output validation schemas
567567

568568
For convenience, JSON Schema has been provided to validate output generated by implementations. Its IRI is: https://json-schema.org/draft/next/output/schema
569+
570+
## Filtering
571+
572+
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.
573+
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.
575+
576+
For those implementations which support filtering behaviors, it MUST be configurable and disabled by default.
577+
578+
### Annotation Filtering
579+
580+
Collecting and storing annotations can require increasing amounts of system resources as evaluation proceeds. The strain on systems can be reduced by only collecting those annotations which users care about.
581+
582+
For annotation filtering, implementations SHOULD provide a mechanism which allows users to configure either the set annotations they would like to keep or the set they would like to ignore.
583+
584+
For a "keep" list, an implementation MUST include in the output only those annotations which are configured.
585+
586+
For an "ignore" list, an implementation MUST NOT include in the output those annotations which are configured.
587+
588+
#### Annotations Required for Evaluation
589+
590+
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`.
591+
592+
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.

0 commit comments

Comments
 (0)