Leverage schemars to generate a JSON Schema from our structs for
configurations and those occurring within them.
Regarding dependency on an alpha version of schemars: Reading the
road to 1.0 issue
I don’t expect that we would be affected by breakage.
We use pretty standard/core parts of the API that probably are most stable.
The output of rad config schema can be used by editors to provide a
smoother editing experience for the configuration file. Discovery of
attributes (both keys and values) is greatly improved with the schema
helping in the background.
Refer to:
- https://json-schema.org
- https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings
- https://schemastore.org
Original description by did:key:z6MkjFMAoA3hUG6tM7Wprn7dh7bquLpmN1f3yECbwkyweQnJ follows:
This will be a great addition especially for LSP users who dont want to read through all the code to know what options can be changed where and how.
How it works: You simply pipe the output into xyz.json and then add to your config: “$schema”: “/path/to/xyz.json” and if you have a working json LSP you’ll get docs, etc. for your config, meaning we’ll have to write a lot less docs in the future :)
modified Cargo.lock
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-cli/Cargo.toml
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle-cli/src/commands/config.rs
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle/Cargo.toml
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle/src/cli.rs
| + | |
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/explorer.rs
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/identity/doc/id.rs
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
| - | |
| - | |
| + | |
| + | |
|
|
|
|
|
modified radicle/src/node.rs
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle/src/node/config.rs
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle/src/node/policy.rs
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle/src/profile/config.rs
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/serde_ext.rs
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/web.rs
| - | |
| - | |
| - | |
| - | |
|
|
| + | |
| + | |
| + | |
|
|
|
|
| - | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|