Debian Codegraph @

schema/README.md

raw symbols SCIP
1 # Config JSON Schema
2
3 ## Generation
4
5 These are automatically generated from the code using [`schemars`](https://github.com/GREsau/schemars). The `schemars`
6 derives are locked behind the `generate_schema` feature flag to avoid building unnecessary code for normal builds.
7 Meanwhile, the generator itself lives in a separate `scripts/schema_gen` helper crate. You can
8 generate them like so:
9
10 ```bash
11 # Will print out to stdout
12 cargo run --manifest-path scripts/schema_gen/Cargo.toml
13
14 # e.g. for nightly
15 cargo run --manifest-path scripts/schema_gen/Cargo.toml > schema/nightly/bottom.json
16
17 # e.g. for a specific version
18 cargo run --manifest-path scripts/schema_gen/Cargo.toml -- 0.12.0 > schema/v0.12.0/bottom.json
19 ```
20
21 Alternatively, run the `scripts/schema/generate.sh` script (for stable releases) or `scripts/schema/nightly.sh`
22 (for nightly), which does all of this for you.
23
24 ## Publication
25
26 To publish these schemas:
27
28 ### Stable
29
30 1. Run `scripts/schema/generate.sh <YOUR_VERSION>`.
31 2. Make a PR and merge it.
32 3. Then, make a PR to [schemastore](https://github.com/SchemaStore/schemastore) to update the catalog.
33 [Here's an example of a PR](https://github.com/SchemaStore/schemastore/pull/5242).
34
35 ### Nightly
36
37 1. Run `scripts/schema/nightly.sh`.
38 2. Make a PR and merge it.