Repository navigation
feat: Support the dependencies keyword in Draft 2019-09 for compatibility - #1006
Merged
DannyvdSluijs merged 1 commit intoNov 27, 2026
Merged
Conversation
…lity Signed-off-by: Roman Ondráček <mail@romanondracek.cz>
DannyvdSluijs
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Draft 2019-09 split
dependenciesintodependentRequiredanddependentSchemas, so the Draft 2019-09 constraints ignoreddependencies. A schema written for an earlier draft and moved to Draft 2019-09 without renaming the keyword silently accepted objects with missing dependencies.The JSON Schema Test Suite covers this backwards compatibility as an optional feature in
optional/dependencies-compatibility.json. This adds it, sodependencieskeeps working as it did in Draft-07.Changes:
Draft2019\DependenciesConstraint: a copy of the Draft-07 constraint, handling both the property array form and the schema form.Draft2019\Factory,Draft2019Constraint: register and checkdependenciesnext todependentSchemasanddependentRequired.JsonSchemaTestSuiteTest: removes the 14 skippedoptional/dependencies-compatibility.jsoncases, which all pass now.Related Issue
None
Type of Change
Checklist
Additional Notes
Properties evaluated by the schema form of
dependenciesare not taken into account byunevaluatedProperties, unlike those ofdependentSchemas.dependenciesis not part of the Draft 2019-09 applicator vocabulary, and the test suite only covers its assertions.#971 (Draft 2020-12) includes this commit and applies it to Draft 2020-12 as well.