Expand description
Utility for generating standalone JSON Schema documents from schemars::JsonSchema types.
This module provides functionality to generate standalone JSON Schema draft 2020-12 documents suitable for code generation tools like datamodel-code-generator.
Enums§
- Refs
- Controls how external type references are handled in the generated schema.
Functions§
- finalize_
discriminators - Post-process a generated schema to make discriminated unions work correctly
with code generators like
datamodel-code-generator. - finalize_
discriminators_ with_ prefix - Like
finalize_discriminators, but with a configurable$refprefix. - generate_
json_ schema - Generate a standalone JSON Schema document from a type implementing JsonSchema.
- generate_
json_ schema_ custom - Generate a JSON Schema document with configurable reference handling and
additional types seeded into
$defs. - generate_
json_ schema_ with_ defs - Generate a standalone JSON Schema document with all
$defsincluded. - generate_
json_ schema_ with_ refs - Generate a JSON Schema document with configurable reference handling.