Skip to main content

Module openapi

Module openapi 

Source
Expand description

OpenAPI 3.0 spec generation + a tiny Swagger UI page.

Walks every RouteDescriptor collected via inventory, converts the associated RouteSpec into a paths.<route>.<method> entry, harvests schemars definitions into components.schemas, and produces a spec that’s immediately browsable in Swagger UI.

Structs§

OpenApiInfo
Top-level OpenAPI document configuration. Build at main.rs and pass to crate::App::launch_with_info.

Enums§

ApiKeyIn
SecurityScheme
HTTP authentication scheme exposed in components.securitySchemes.

Constants§

SWAGGER_UI_HTML
Minimal Swagger UI page (CDN-hosted assets). No build step, no extra crate.

Functions§

build_spec
Build a complete OpenAPI 3.0 document from all routes registered via inventory.
build_spec_filtered
allowed_controllers = None means “include every inventory-registered route” (legacy / no module scoping). Some(set) filters to controllers reachable from the root module’s import DAG.