Skip to content

remove redundant sections about keyword independence #1548

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 1 commit into from
Nov 8, 2024

Conversation

gregsdennis
Copy link
Member

What kind of change does this PR introduce?

Clarification

Issue & Discussion References

Summary

Removes 2 redundant sections about keywords being independent. We now have a "Keyword Independence" section, and each keyword section explicitly states their relations to other keywords.

Does this PR introduce a breaking change?

No

@gregsdennis gregsdennis added this to the stable-release milestone Oct 21, 2024
@gregsdennis gregsdennis requested a review from a team October 21, 2024 05:21
@gregsdennis gregsdennis self-assigned this Oct 21, 2024
Copy link
Member

@jdesrosiers jdesrosiers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case anyone else is trying to find where this was stated elsewhere, it's in the "Keyword Interactions" section line 487.

### Keyword Interactions

Unless otherwise specified, keywords act independently.

Keywords MAY modify their behavior based on the presence, absence, or value of
another keyword in the same schema object. Such keywords MUST NOT result in a
circular dependency.

Supplementary specifications are encouraged to specify any dependencies as part
of the dependent keyword (i.e. the keyword whose behavior is modified).

Within this document, keyword dependencies are expressed using one of the
following mechanisms:

- Static dependencies, in which the dependency relies on the presence or
  contents of another keyword.
- Dynamic dependencies, in which the dependency relies on the evaluation of
  another keyword against an instance. This dependency may be on either the
  annotations produced by the keyword or the validation result of its
  subschema(s).

These mechanisms are used merely to describe dependencies; they are for
illustrative purposes and not prescriptive. Implementations MAY use whatever
mechanisms make sense given the needs of their architecture and language in
order to achieve the specified behaviors.

So with this change, we are no longer being explicit about which keywords violation the keyword independence principle. I think that's fine.

@gregsdennis gregsdennis requested a review from a team October 29, 2024 08:24
@gregsdennis gregsdennis force-pushed the gregsdennis/independence-dedup branch from fd4a68f to d1935d2 Compare November 8, 2024 23:10
@gregsdennis gregsdennis merged commit 0a98ed7 into main Nov 8, 2024
6 checks passed
@gregsdennis gregsdennis deleted the gregsdennis/independence-dedup branch November 8, 2024 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Section "Keyword independence" is written twice
2 participants