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

Create JSON schema for config #149

Closed
EmilyGraceSeville7cf opened this issue Apr 19, 2023 · 6 comments · Fixed by #150
Closed

Create JSON schema for config #149

EmilyGraceSeville7cf opened this issue Apr 19, 2023 · 6 comments · Fixed by #150
Assignees

Comments

@EmilyGraceSeville7cf
Copy link
Collaborator

You can assign me to this task as always. ;)

@DannyBen
Copy link
Owner

Welcome collaborator, as usual :)

@EmilyGraceSeville7cf
Copy link
Collaborator Author

Here is a PR to SchemaStore.

@DannyBen
Copy link
Owner

Here is a PR to SchemaStore.

Doesn't SchemaStore have some way of handling versions?

Imagine anytime any of these schemas are updated on the master branch, it will prevent all users of an older version from using it, and in some cases - when the master contains an unreleased code - it will prevent everybody from using it.

@EmilyGraceSeville7cf
Copy link
Collaborator Author

EmilyGraceSeville7cf commented Apr 19, 2023

Doesn't SchemaStore have some way of handling versions?

It does. ;) There are two ways to implement multiple version support: via catalog.json from SchemaStore or directly inside schema via oneOf keyword. The second approach is suitable when there is something to identify file version directly. For instance, go-task tool has version key inside file to switch between several syntax versions. In other words, the first aproach (via catalog.json) suits our situation.

When there are multiple versions presented via version key in catalog.json there are also the same amount of corresponding JSON schemas, file per version.

@DannyBen
Copy link
Owner

So what will be the course of action when one of these schemas you made needs a new version?

@EmilyGraceSeville7cf
Copy link
Collaborator Author

So what will be the course of action when one of these schemas you made needs a new version?

Just create a new JSON schema with some edits incorporating new features. ;) In VS Code in such situation, editor notifies that multiple schemas match some file and lets to chose what file version is used.

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 a pull request may close this issue.

2 participants