use std::io;
const SCHEMA_JSON: &str = r#"{
"type": "object",
"title": "Record",
"required": ["id"],
"properties": {
"id": { "type": "string" },
"name": { "type": "string" },
"status": { "type": "string", "enum": ["active", "inactive"] },
"nested": {
"type": "object",
"title": "NestedInfo",
"required": ["value"],
"properties": {
"value": { "type": "string" },
"kind": { "type": "string", "enum": ["A", "a"] }
}
},
"foo-bar": { "type": "string" }
}
}"#;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut stdout: io::Stdout = io::stdout();
json_schema_rs::generate_to_writer(SCHEMA_JSON, &mut stdout)?;
Ok(())
}