ushka.api.openapi
OpenAPI 3.1 description of your app, generated from the handler signatures.
It reads the same parameter plans the request validation uses, so the document
cannot drift from what the app actually accepts. app.openapi() returns the
dict and app.use(OpenAPI()) serves it as JSON at /openapi.json.
In this module
def build() | The OpenAPI document for every route registered on router. |
class OpenAPI | Serves the OpenAPI document of the app: app.use(OpenAPI()). |
def build
def build(
router,
title: str = 'Ushka API',
version: str = '0.1.0',
skip: set | None = None,
) -> dictThe OpenAPI document for every route registered on router.
class OpenAPI
Serves the OpenAPI document of the app: app.use(OpenAPI()).
Opt-in, because the document is a map of your routes. The route that serves it (and
the MCP endpoint) are left out of it. app.enable_openapi() is the same thing.
Parameters
| Name | Type | Description |
|---|---|---|
path | str | Where the JSON is served. |
title | str | Defaults to |
version | str | The API version shown in the document. |
install
def install(app) -> None