Skip to main content

Module controller

Module controller 

Source
Expand description

Documentation endpoints: OpenAPI JSON at GET /docs and the Swagger UI.

DocumentationController mounts the JSON spec route plus a static-file handler for the bundled UI. Call DocumentationController::build_specs after all controllers are mounted, so the cached spec includes every route.

Use this controller when an HTTP service should expose its registered API docs. In production the routes are skipped unless the registrant mode is DocumentationMode::External.

Structs§

DocumentationController
Serves the OpenAPI document and the Swagger UI for the service.