# jsonschema-explain
[](https://crates.io/crates/jsonschema-explain)
[](https://docs.rs/jsonschema-explain)
[](https://github.com/lintel-rs/lintel)
[](https://github.com/lintel-rs/lintel/blob/master/LICENSE)
Render JSON Schema as human-readable terminal documentation
## Features
- Man-page-style terminal output from typed `jsonschema_schema::SchemaValue` schemas
- ANSI colors with bold headers, dimmed metadata, and highlighted types
- Syntax-highlighted code blocks in schema descriptions (via `markdown-to-ansi`)
- Renders properties, required fields, enums, defaults, `oneOf`/`anyOf`/`allOf` variants
- Caller-provided width for terminal-aware layout
## Usage
```rust
use jsonschema_explain::{explain, ExplainOptions};
use jsonschema_schema::SchemaValue;
let schema: SchemaValue = serde_json::from_str(r#"{"type": "object"}"#).unwrap();
let opts = ExplainOptions { color: true, syntax_highlight: true, width: 120, validation_errors: vec![], extended: false };
let output = explain(&schema, "my-config", &opts);
println!("{output}");
```
Part of the [Lintel](https://github.com/lintel-rs/lintel) project.
## License
Apache-2.0