pitchfork-cli 2.6.0

Daemons with DX
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::Result;
use crate::pitchfork_toml::PitchforkToml;
use schemars::schema_for;

/// Generate JSON Schema for pitchfork.toml configuration
#[derive(Debug, clap::Args)]
#[clap(hide = true)]
pub struct Schema;

impl Schema {
    pub async fn run(&self) -> Result<()> {
        let schema = schema_for!(PitchforkToml);
        let json = serde_json::to_string_pretty(&schema).unwrap();
        println!("{json}");
        Ok(())
    }
}