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

JSON schema store #187

Open
prasadtalasila opened this issue Aug 12, 2024 · 2 comments
Open

JSON schema store #187

prasadtalasila opened this issue Aug 12, 2024 · 2 comments
Assignees

Comments

@prasadtalasila
Copy link
Contributor

There is wide support for schemastore in VSCode. Is there an advantage to using this facility in our project?

@CThuleHansen
Copy link

Great idea!
I am currently building such a store powered by pull-requests. A bot will check the pull-requests and a website will extract the schemas from the repo.

The convention for JSON schemas are as follows:

<schema-name>.root.json is determine users and their roles for schemas with the name .
<schema-name>.v<version>.schema.json determine the schema for version <version> of the schema with the name <schema-name>. Only users specified in the <schema-name>.root.json file can create, update and delete schemas with the name <schema-name>.
It is necessary to create a <schema-name>.root.json before creating <schema-name>.v<version>.schema.json files.

New Root
Create a pull-request with a file called <schema-name>.root.json in the schemas folder.
See the file caemh.root.json for inspiration.

Roles:

All users can read schemas.
Administrators can Create, Update and Delete schemas.
Creators can Create and Update schemas.
Create/Update/Delete Schema
Create a pull-request with the schema change in the schemas folder. The schema file should be named <schema-name>.v<version>.schema.json. The pull-request is checked against the <schema-name>.root.json file to determine if the user has the necessary permissions to create/update/delete the gieven schema.

@prasadtalasila
Copy link
Contributor Author

Interesting. The scope we are thinking of is more limited. Have schemas in the schema store. These do not change from release to release. We can either fetch them from third-party json schema store, or package them with the CoSimulation Studio application. I am leaning towards schemastore but we will have to see the implementation details.

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

No branches or pull requests

3 participants