diff --git a/fastapi/openapi/.generation_meta.json b/fastapi/openapi/.generation_meta.json new file mode 100644 index 0000000000..83ebf83bdd --- /dev/null +++ b/fastapi/openapi/.generation_meta.json @@ -0,0 +1,4 @@ +{ + "agent": "Marvis", + "date": "2026-05-29T00:25:14.5754419+08:00" +} diff --git a/fastapi/openapi/docs.py b/fastapi/openapi/docs.py index 0d9242f9fa..4c15d69d0e 100644 --- a/fastapi/openapi/docs.py +++ b/fastapi/openapi/docs.py @@ -76,7 +76,7 @@ def get_swagger_ui_html( [FastAPI docs for Custom Docs UI Static Assets](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/) """ ), - ] = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui-bundle.js", + ] = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.20.1/swagger-ui-bundle.js", swagger_css_url: Annotated[ str, Doc( @@ -89,7 +89,7 @@ def get_swagger_ui_html( [FastAPI docs for Custom Docs UI Static Assets](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/) """ ), - ] = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@5/swagger-ui.css", + ] = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.20.1/swagger-ui.css", swagger_favicon_url: Annotated[ str, Doc( @@ -233,7 +233,7 @@ def get_redoc_html( [FastAPI docs for Custom Docs UI Static Assets](https://fastapi.tiangolo.com/how-to/custom-docs-ui-assets/) """ ), - ] = "https://cdn.jsdelivr.net/npm/redoc@2/bundles/redoc.standalone.js", + ] = "https://cdn.jsdelivr.net/npm/redoc@2.7.0/bundles/redoc.standalone.js", redoc_favicon_url: Annotated[ str, Doc( diff --git a/tests/test_application.py b/tests/test_application.py index 6758662980..aa20e65b2e 100644 --- a/tests/test_application.py +++ b/tests/test_application.py @@ -43,7 +43,7 @@ def test_redoc(): response = client.get("/redoc") assert response.status_code == 200, response.text assert response.headers["content-type"] == "text/html; charset=utf-8" - assert "redoc@2" in response.text + assert "redoc@2.7.0" in response.text def test_enum_status_code_response():