Module aws_lambda_powertools.event_handler.openapi.swagger_ui.html

Functions

def generate_swagger_html(spec: str, path: str, swagger_js: str, swagger_css: str, swagger_base_url: str, oauth2_config: Optional[OAuth2Config], persist_authorization: bool = False) ‑> str

Generate Swagger UI HTML page

Parameters

spec : str
The OpenAPI spec
path : str
The path to the Swagger documentation
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.