use std::fs;
use std::path::Path;
fn main() {
let schema = runner::config_schema();
let json = serde_json::to_string_pretty(&schema).expect("schema should serialize to JSON");
let out = Path::new(env!("CARGO_MANIFEST_DIR")).join("schemas/runner.toml.schema.json");
if let Some(parent) = out.parent() {
fs::create_dir_all(parent).expect("schemas dir should be creatable");
}
fs::write(&out, format!("{json}\n")).expect("schema file should be writable");
println!("wrote {} ({} bytes)", out.display(), json.len() + 1);
}