Module aws_lambda_powertools.event_handler.openapi.swagger_ui.html

Functions

def generate_swagger_html(spec: str, swagger_js: str, swagger_css: str, swagger_base_url: str, oauth2_config: OAuth2Config | None, persist_authorization: bool = False)

Generate Swagger UI HTML page

Parameters

spec : str
The OpenAPI spec
swagger_js : str
 
Swagger UI JavaScript source code or URL
swagger_css : str
Swagger UI CSS source code or URL
swagger_base_url : str
The base URL for Swagger UI
oauth2_config : OAuth2Config, optional
The OAuth2 configuration.
persist_authorization : bool, optional
Whether to persist authorization data on browser close/refresh.