MCPcopy Create free account
hub / github.com/bootc-dev/bootc / generate_normalized_json_schema

Function generate_normalized_json_schema

crates/xtask/src/xtask.rs:611–618  ·  view source on GitHub ↗

Generate and normalize a JSON schema from the binary. Ensures a consistent trailing newline so files are stable across editors.

(sh: &Shell, of: &str)

Source from the content-addressed store, hash-verified

609/// Generate and normalize a JSON schema from the binary.
610/// Ensures a consistent trailing newline so files are stable across editors.
611fn generate_normalized_json_schema(sh: &Shell, of: &str) -> Result<String> {
612 let schema = cmd!(sh, "cargo run -q -- internals print-json-schema --of={of}").read()?;
613 Ok(if schema.ends_with('\n') {
614 schema
615 } else {
616 format!("{schema}\n")
617 })
618}
619
620/// Update JSON schema files
621#[context("Updating JSON schemas")]

Callers 2

update_json_schemasFunction · 0.85
check_json_schemasFunction · 0.85

Calls 1

readMethod · 0.45

Tested by

no test coverage detected