Repository navigation
Add dependentRequired and dependentSchemas for draft 2019-09 - #236
Open
chinmayajha wants to merge 1 commit into
Open
chinmayajha wants to merge 1 commit into
chinmayajha wants to merge 1 commit into
Conversation
Author
|
@horejsek same for this one, the workflows need approval before CI runs. |
This branch has not been deployed
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.
Draft 2019-09 split
dependenciesintodependentRequiredanddependentSchemas, but neither is implemented, so both are silently ignored:Both keywords work like the two shapes
dependenciesalready handles (a list of names, or a schema), so the draft 04 code moves into_generate_dependencies(rule)and the draft 2019 generator calls it for each keyword. The errorruleis the keyword name. Likedependencies, they are inserted beforepropertiesso a default value can't trigger them. Drafts 04, 06 and 07 still ignore them. Schemas without$schemause the 2019 generator, so they get the new checks too.dependentRequired.jsonanddependentSchemas.jsonfrom the test suite now pass, so I removed them from the draft 2019 ignore list. I also added a test intests/test_object.pythat a default doesn't trigger either keyword. The full suite passes and pylint is unchanged. CHANGELOG has an entry under UNRELEASED.