betty.openapi module

Provide the OpenAPI specification.

class betty.openapi.Specification[source]

Bases: object

Build OpenAPI specifications.

Parameters:

app (betty.app.App)

__init__(app: betty.app.App)[source]
Parameters:

app (betty.app.App)

async build() dict[str, bool | int | float | str | None | Sequence[bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]] | Mapping[str, bool | int | float | str | None | Sequence[Dump] | Mapping[str, Dump]]][source]

Build the OpenAPI specification.

Return type:

dict[str, typing.Union[bool, int, float, str, None, typing.Sequence[typing.Union[bool, int, float, str, None, typing.Sequence[Dump], typing.Mapping[str, Dump]]], typing.Mapping[str, typing.Union[bool, int, float, str, None, typing.Sequence[Dump], typing.Mapping[str, Dump]]]]]