Vega-lite: Add schema property like Vega 3

Created on 3 Nov 2016  路  4Comments  路  Source: vega/vega-lite

For example

"schema": {"language": "vega", "version": "3.0.0"},

Most helpful comment

While not officially finalized, I think we're close to the right syntax here. Maybe limit to "major.minor" for version? Patch numbers should not change the schema if we adhere to a proper semver-style system.

If we agree, I will update the Vega examples accordingly.

All 4 comments

While not officially finalized, I think we're close to the right syntax here. Maybe limit to "major.minor" for version? Patch numbers should not change the schema if we adhere to a proper semver-style system.

If we agree, I will update the Vega examples accordingly.

Actually, another alternative to consider is the JSON schema's standard $schema property which points to URI that hosts a schema of particular version.

For example, our automatically generated vega-lite schema refer to the JSON schema's schema.

"$schema": "http://json-schema.org/draft-04/schema#"

We could do something like

"$schema": "http://vega.github.io/vega/schema/3.0/vega-schema.json"
"$schema": "http://vega.github.io/vega-lite/schema/2.0/vega-schema.json"

and make sure our deploy script add new version to our github pages whenever we release.

The benefit of this is that this is standard. If user's editor (e.g., VS Code) support JSON validation / autocompletion, they get validation / auto-completion for free without the need to install any plugin.

@domoritz isn't this done?

Was this page helpful?
0 / 5 - 0 ratings