Skip to content
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

Dynamically determine jsonschema validator #2812

Merged
merged 3 commits into from
Jan 7, 2023

Conversation

binste
Copy link
Contributor

@binste binste commented Jan 7, 2023

Closes #2800

Tested with jsonschema 4.17.3 (newest) and 3.0.0 (minimum requirement). I had to introduce $schema in the test schemas as well so that it takes the same validator for the tests as when validating against the latest vega-lite schema.

@mattijn
Copy link
Contributor

mattijn commented Jan 7, 2023

Thanks for this PR @binste! Could we add a test with two dummy schemas where one uses a draft 7 $schema specification and the other a draft 2020 $schema property and assert if it this is correct?

@binste
Copy link
Contributor Author

binste commented Jan 7, 2023

Sure! Is this what you had in mind? The test would fail in case the validation would no longer use a different validator class based on the $schema property.

@mattijn
Copy link
Contributor

mattijn commented Jan 7, 2023

Yes! Looks good. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use dialect identifier from vega-lite-schema to set jsonschema validator
2 participants