Skip to content

Commit 864df75

Browse files
authored
Merge pull request #1445 from json-schema-org/gregsdennis/annotations-as-illustration
add section about keyword interaction mechanics being illustrative
2 parents d05516c + a5f5782 commit 864df75

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

Diff for: jsonschema-core.md

+23-5
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,29 @@ to inform the user of the evaluation path that produced the error or annotation.
516516

517517
### Keyword Interactions
518518

519-
Keyword behavior MAY be defined in terms of the annotation results of
520-
[subschemas](#root) and/or adjacent keywords (keywords within the same schema
521-
object) and their subschemas. Such keywords MUST NOT result in a circular
522-
dependency. Keywords MAY modify their behavior based on the presence or absence
523-
of another keyword in the same [schema object](#schema-document).
519+
Unless otherwise specified, keywords act independently.
520+
521+
Keywords MAY modify their behavior based on the presence, absence, or value of
522+
another keyword in the same schema object. Such keywords MUST NOT result in a
523+
circular dependency.
524+
525+
Supplementary specifications are encouraged to specify any dependencies as part
526+
of the dependent keyword (i.e. the keyword whose behavior is modified).
527+
528+
Within this document, keyword dependencies are expressed using one of the
529+
following mechanisms:
530+
531+
- Static dependencies, in which the dependency relies on the presence or
532+
contents of another keyword.
533+
- Dynamic dependencies, in which the dependency relies on the evaluation of
534+
another keyword against an instance. This dependency may be on either the
535+
annotations produced by the keyword or the validation result of its
536+
subschema(s).
537+
538+
These mechanisms are used merely to describe dependencies; they are for
539+
illustrative purposes and not prescriptive. Implementations MAY use whatever
540+
mechanisms make sense given the needs of their architecture and language in
541+
order to achieve the specified behaviors.
524542

525543
### Default Behaviors {#default-behaviors}
526544

0 commit comments

Comments
 (0)