Transparently unwrap one layer of container indirection (array → items, map → additionalProperties). Returns the element schema if a container, else returns the input unchanged. Used so `explain reply.evidence` shows the Evidence variants directly and `explain state.steps` shows the StepState fields directly.
(rs: &RootSchema, obj: &SchemaObject)
| 363 | /// the Evidence variants directly and `explain state.steps` shows the |
| 364 | /// StepState fields directly. |
| 365 | fn unwrap_container(rs: &RootSchema, obj: &SchemaObject) -> SchemaObject { |
| 366 | let s = resolve(rs, obj); |
| 367 | if let Some(item) = array_item(s) { |
| 368 | return resolve(rs, item).clone(); |
| 369 | } |
| 370 | if let Some(value) = map_value(s) { |
| 371 | return resolve(rs, value).clone(); |
| 372 | } |
| 373 | s.clone() |
| 374 | } |
| 375 | |
| 376 | /// Render a minimal valid JSON example for the schema. Always ends with a newline |
| 377 | /// so the output is line-clean when piped to a file or another command. |
no test coverage detected
searching dependent graphs…