Skip to main content

Module reverse_code_gen

Module reverse_code_gen 

Source
Expand description

Reverse codegen: Rust types to JSON Schema.

Types implement ToJsonSchema to produce a JsonSchema value that can be serialized via TryFrom to String or Vec<u8>.

Structs§

HandWrittenExample
Minimal hand-written struct implementing ToJsonSchema (used to validate trait shape).

Traits§

ToJsonSchema
Trait for types that can produce a JSON Schema.

Functions§

merge_nested_defs_into_root
Merges nested $defs from schema into root_defs, returns schema with defs: None.