| 25 | #[derive(Clone, Copy, Debug, clap::ValueEnum)] |
| 26 | #[clap(rename_all = "snake_case")] |
| 27 | pub enum ExplainFormat { |
| 28 | /// Human-readable schema (default; kubectl-explain style). |
| 29 | Plaintext, |
| 30 | /// Minimal valid JSON instance for the type. |
| 31 | Example, |
| 32 | /// Raw JSON Schema (Draft 2020-12 via schemars). |
| 33 | Jsonschema, |
| 34 | } |
| 35 | |
| 36 | /// Entry point: render the schema rooted at `path` in the requested format. |
| 37 | pub fn explain(path: &str, fmt: ExplainFormat) -> Result<String> { |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…