From ec072d75fe0aae16caec3a8aa3f57ca8d6f05de5 Mon Sep 17 00:00:00 2001 From: Teo Koon Peng Date: Tue, 23 Aug 2022 21:57:25 +0800 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=20Upgrade=20Swagger=20UI=20copy=20of?= =?UTF-8?q?=20`oauth2-redirect.html`=20to=20include=20fixes=20for=20flavor?= =?UTF-8?q?s=20of=20authorization=20code=20flows=20in=20Swagger=20UI=20(#3?= =?UTF-8?q?439)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sebastián Ramírez --- fastapi/openapi/docs.py | 43 +++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/fastapi/openapi/docs.py b/fastapi/openapi/docs.py index d6af17a85..b7803b13b 100644 --- a/fastapi/openapi/docs.py +++ b/fastapi/openapi/docs.py @@ -115,12 +115,14 @@ def get_redoc_html( def get_swagger_ui_oauth2_redirect_html() -> HTMLResponse: + # copied from https://github.com/swagger-api/swagger-ui/blob/v4.14.0/dist/oauth2-redirect.html html = """ - + - - - + + Swagger UI: OAuth2 Redirect + + + + """ return HTMLResponse(content=html)