tools
tools copied to clipboard
Added `json-schema`
Summary
Created schema.json following the json-schema standards to improve DX.
Closes #3601 | Closes #3690
Test Plan

Deploy request for docs-rometools pending review.
Visit the deploys page to approve it
| Name | Link |
|---|---|
| Latest commit | 85bfa8041dc4c651641c96d7c34bc47bebef4caa |
Thank you @Rawnly for creating the schema.
I'm unfamiliar with how editors detect a JSON schema. How does the editor know where to look up the document?
We already generated a schema and ship it with the VS Code extension. It should be straightforward to write the same file to multiple locations if it is necessary to publish it on the website too.
https://github.com/rome/tools/blob/82b9aa7be444cf77b14780ee7591cb750884e573/editors/vscode/configuration_schema.json
I'm unfamiliar with how editors detect a JSON schema. How does the editor know where to look up the document?
For the existing schema file, the validation schema is declared to the editor as part of the extension manifest: https://github.com/rome/tools/blob/82b9aa7be444cf77b14780ee7591cb750884e573/editors/vscode/package.json#L101-L106
I'm unfamiliar with how editors detect a JSON schema. How does the editor know where to look up the document?
There's a $schema key indicating the path to the spec (which can be an url), most editors supports it out of the box without 3rd party plugins
We already generated a schema and ship it with the VS Code extension. It should be straightforward to write the same file to multiple locations if it is necessary to publish it on the website too.
Oh I didn't noticed that! However the one i generated seems to be a bit more complete, providing key descriptions too. (I generated it running a script on the docs page). I think that description can be useful to avoid switching back and forth with docs.
I assume this can be closed right? @ematipico
@Rawnly yes :) I took in consideration your feedback about the description of the rules, which is a great one! I couldn't miss it!