ska_dlm.fastapi_utils

Common utilities for CLI modules.

Functions

create_fastapi_function_info(func, doc)

Create dictionary of default FastAPI annotations for a given function.

create_fastapi_parameter_info(param_type, ...)

Create a FastAPI field info.

decode_bearer(bearer)

Extract token from Bearer string and decode.

fastapi_auto_annotate(app)

Automatically applies fastapi_docstring_annotate to all FastAPI app routes.

fastapi_docstring_annotate(func)

Decorate FastAPI function with doc annotations from the signature and docstring.

get_underlying_type(annotation)

Get the underlying type union of an annotation.