Skip to content

add section about keyword interaction mechanics being illustrative #1445

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

Merged
merged 9 commits into from
Jun 18, 2024
22 changes: 17 additions & 5 deletions jsonschema-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,11 +523,23 @@ to inform the user of the evaluation path that produced the error or annotation.

### Keyword Interactions

Keyword behavior MAY be defined in terms of the annotation results of
[subschemas](#root) and/or adjacent keywords (keywords within the same schema
object) and their subschemas. Such keywords MUST NOT result in a circular
dependency. Keywords MAY modify their behavior based on the presence or absence
of another keyword in the same [schema object](#schema-document).
Keywords MAY modify their behavior based on the presence, absence, or value of
another keyword in the same [schema object](#schema-document). Such keywords
MUST NOT result in a circular dependency.

Unless otherwise specified, keywords act independently.

#### Annotations as an Interaction Mechanism

This document uses annotations as a mechanism to describe the interactions
between keywords, however this is for illustrative purposes and not
prescriptive. Implementations MAY use whatever mechanisms makes sense given
their architecture and language needs in order to achieve the specified
behaviors. Implementations are not required to collect annotations in order to
manage keyword interaction.

Supplementary specifications are also encouraged to use annotations to describe
any interactions of the keywords they define.

### Default Behaviors {#default-behaviors}

Expand Down