FR: Publish the .hujson schema to schemastore.org
To use the megalinter and linter in many IDEs is a release the json schema on https://schemastore.org required.
https://github.com/SchemaStore/schemastore
Is the implementation possible in time?
Hi, this is not a priority for us at the moment since we primarily use HuJSON in a web UI that already provides syntax highlighting. You're welcome to contribute a schema file if you want. I don't know much about schemastore and it's fairly low on my priority list to understand how it works.
Where can I find the schema definition for syntax highlighting in the Web UI?
We just need to store it at SchemaStore. It can still be hosted at your end as well. Background is, e.g. for the Tailscale GitOps Pusher usage and a previous validation of the new Tailscale Policy Rule definition in the git repository.
I now assumed that if a syntax validation and highlighting already exists in the web UI, we can simply deposit this in the SchemaStore.
This would not only allow e.g. MegaLinter to validate the syntax of the .hujson in a CI PipeLine, but also when writing via VS Code or other IDEs the highlighting and syntax validation could be used directly.
Here is an example from GitLab for the .gilab-ci.yml: https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json
Hello @dsnet,
can you help me with my question? Is there a schema file as it said in my example for GitLab CI ?
Best regards,
Bjoern
https://github.com/tailscale/hujson/issues/28#issuecomment-1331187018
There is not currently a schema file usable for your purpose. We are not likely to create one in the near future.