Skip to main content

Module openapi

Module openapi 

Source
Expand description

Thin OpenAPI 3.1 adaptor over super::json_schema.

Re-emits the same per-node shape but reroutes JSON-Schema’s $defs into OpenAPI’s components/schemas (and rewrites the corresponding $ref pointers). Per-branch union schemas (synthesised by [super::json_schema::add_union_branch_defs] under tag-derived keys resolved via [super::json_schema::BranchNameTable]) ship as additional component schemas so discriminator mappings resolve.

Functions§

to_external_input_openapi_components
Render a schema bundle for untrusted external input.
to_external_output_openapi_components
Render a schema bundle for externally visible output.
to_openapi_components
Render (graph, ty) to an OpenAPI 3.1 schema bundle.