mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-08-17 14:51:04 +02:00
feat(config): json schema support
This PR includes the necessary code changes, CI changes and documentation to generate and deploy a full JSON schema for each release and the master branch, which can be used within config files for autocomplete and type checking.
This commit is contained in:
parent
a47ef0c763
commit
36d724f148
36 changed files with 230 additions and 15 deletions
|
@ -76,6 +76,13 @@ fn main() {
|
|||
fn run_with_args() {
|
||||
let args = cli::Args::parse();
|
||||
|
||||
#[cfg(feature = "schema")]
|
||||
if args.print_schema {
|
||||
let schema = schemars::schema_for!(Config);
|
||||
println!("{}", serde_json::to_string_pretty(&schema).unwrap());
|
||||
return;
|
||||
}
|
||||
|
||||
match args.command {
|
||||
Some(command) => {
|
||||
let rt = create_runtime();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue