JSON Schema for the Control Socket
JSON Schema extraction via schemars is provided for configurations.
There are other interfaces that use JSON for (de-)serialization, such as
the communication with radicle-node via the control socket.
To ease implementation of tools that want to communicate via the control
socket, we add the respective schemars annotations.
Extracting of JSON Schemas
Extracting JSON Schemas from the Radicle crate can be done via
radicle-cli for radicle::profile::Config by executing:
rad config schema
However, for other JSON Schema metadata, this is not possible.
To allow other tools to extract JSON schemas as part of their build
process, introduce a new crate that only depends on radicle,
schemars, and serde, with a tiny binary that will reproduce various
schemas.
schemars as workspace dependency
The schemars crate is a dependency of multiple workspace crates in the
same version. Its version number is repeated multiple times in the
respective */Cargo.toml files. This requires more maintenance effort
and risks versions drifting.
As long as all crates depend on the same version, it makes more sense to
have schemars as a workspace dependency.
See: https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table
modified Cargo.lock
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified Cargo.toml
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle-cli/Cargo.toml
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
added radicle-schemars/Cargo.toml
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
added radicle-schemars/src/main.rs
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
modified radicle/Cargo.toml
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/lib.rs
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
modified radicle/src/node.rs
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle/src/node/address.rs
|
|
|
|
|
|
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
|
|
|
|
|
modified radicle/src/node/seed.rs
|
|
|
|
|
|
| + | |
|
|
|
|
| + | |
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle/src/schemars_ext.rs
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
modified radicle/src/storage.rs
|
|
|
|
|
|
| + | |
|
|
| - | |
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
modified radicle/src/storage/refs.rs
|
|
|
|
|
|
| + | |
|
|
|
|
| + | |
| + | |
| + | |
| + | |
|
|
|
|
| + | |
|
|
|
|
|