You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vega specifies the $schema property in the schema (see for example L3 here), which is a "dialect identifier", it basically is a URI that identifies which version of the JSON Schema spec the schema is written for -- an example of one is https://json-schema.org/draft-07/schema which is the dialect ID for draft 7 of the spec
we can then use jsonschema.validators.validator_for to get the right validator class given the schema, which will return you Draft7Validator if the schema use draft 7, but if/when Vega-lite repo upgrade to draft2020 say, then you'd get Draft202012Validator instead and things will work properly still.
Currently (or at least after PR #2771 is merged) the validator version is defined as a constant (draft 7). Altair currently uses this validator for the schema definitions for Vega-lite v3/v4/v5 (and that is still fine as they all use the draft 7 schema). So in my understanding the required change to get this working properly is to make it dynamic and set and define the validator on a version by version basis.
The text was updated successfully, but these errors were encountered:
As was pointed out in #2771 (comment), and summarised here:
$schema
property in the schema (see for example L3 here), which is a "dialect identifier", it basically is a URI that identifies which version of the JSON Schema spec the schema is written for -- an example of one ishttps://json-schema.org/draft-07/schema
which is the dialect ID for draft 7 of the specjsonschema.validators.validator_for
to get the right validator class given the schema, which will return youDraft7Validator
if the schema use draft 7, but if/when Vega-lite repo upgrade to draft2020 say, then you'd getDraft202012Validator
instead and things will work properly still.Currently (or at least after PR #2771 is merged) the validator version is defined as a constant (draft 7). Altair currently uses this validator for the schema definitions for Vega-lite v3/v4/v5 (and that is still fine as they all use the draft 7 schema). So in my understanding the required change to get this working properly is to make it dynamic and set and define the validator on a version by version basis.
The text was updated successfully, but these errors were encountered: