For example
"schema": {"language": "vega", "version": "3.0.0"},
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.
Related vega issue https://github.com/vega/vega/issues/448#issuecomment-265033154
@domoritz isn't this done?
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.