Skip to main content

Module openapi

Module openapi 

Source
Expand description

Emit an OpenAPI 3.1 document from a slice of SqlRoute.

The spec is built as a raw serde_json::Value rather than reusing crate::openapi::OpenApiSpec because the existing struct is a subset that lacks several 3.1 idioms we need (array-typed type, oneOf for nullability, enum). Emitting as Value keeps this module decoupled and the output round-trips through any OpenAPI 3.1 consumer.

Structs§

OpenApiInfo

Functions§

openapi_from_routes
Build an OpenAPI 3.1 document from a list of SQL-derived routes. The returned Value is ready to be serde_json::to_writer_pretty-ed to disk.