- Sort Score
- Num 10 results
- Language All
Results 1 - 7 of 7 for test_swagger_ui_oauth2_redirect_html (0.16 seconds)
-
tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py
response = client.get("/docs") assert response.status_code == 200, response.text assert "/static/swagger-ui-bundle.js" in response.text assert "/static/swagger-ui.css" in response.text def test_swagger_ui_oauth2_redirect_html(client: TestClient): response = client.get("/docs/oauth2-redirect") assert response.status_code == 200, response.text assert "window.opener.swaggerUIRedirectOauth2" in response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.2K bytes - Click Count (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py
assert "https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js" in response.text assert "https://unpkg.com/swagger-ui-dist@5/swagger-ui.css" in response.text def test_swagger_ui_oauth2_redirect_html(client: TestClient): response = client.get("/docs/oauth2-redirect") assert response.status_code == 200, response.text assert "window.opener.swaggerUIRedirectOauth2" in response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.3K bytes - Click Count (0) -
docs_src/custom_docs_ui/tutorial001_py39.py
from fastapi import FastAPI from fastapi.openapi.docs import ( get_redoc_html, get_swagger_ui_html, get_swagger_ui_oauth2_redirect_html, ) app = FastAPI(docs_url=None, redoc_url=None) @app.get("/docs", include_in_schema=False) async def custom_swagger_ui_html(): return get_swagger_ui_html( openapi_url=app.openapi_url, title=app.title + " - Swagger UI",
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.1K bytes - Click Count (0) -
docs_src/custom_docs_ui/tutorial002_py39.py
from fastapi import FastAPI from fastapi.openapi.docs import ( get_redoc_html, get_swagger_ui_html, get_swagger_ui_oauth2_redirect_html, ) from fastapi.staticfiles import StaticFiles app = FastAPI(docs_url=None, redoc_url=None) app.mount("/static", StaticFiles(directory="static"), name="static") @app.get("/docs", include_in_schema=False) async def custom_swagger_ui_html(): return get_swagger_ui_html(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.1K bytes - Click Count (0) -
docs/en/docs/reference/openapi/docs.md
::: fastapi.openapi.docs.get_swagger_ui_html ::: fastapi.openapi.docs.get_redoc_html ::: fastapi.openapi.docs.get_swagger_ui_oauth2_redirect_html
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Oct 18 12:36:40 GMT 2023 - 360 bytes - Click Count (0) -
fastapi/openapi/docs.py
</noscript> <redoc spec-url="{openapi_url}"></redoc> <script src="{redoc_js_url}"> </script> </body> </html> """ return HTMLResponse(html) def get_swagger_ui_oauth2_redirect_html() -> HTMLResponse: """ Generate the HTML response with the OAuth2 redirection for Swagger UI. You normally don't need to use or change this. """Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 10.1K bytes - Click Count (0) -
fastapi/applications.py
from fastapi.logger import logger from fastapi.middleware.asyncexitstack import AsyncExitStackMiddleware from fastapi.openapi.docs import ( get_redoc_html, get_swagger_ui_html, get_swagger_ui_oauth2_redirect_html, ) from fastapi.openapi.utils import get_openapi from fastapi.params import Depends from fastapi.types import DecoratedCallable, IncEx from fastapi.utils import generate_unique_id
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 176.3K bytes - Click Count (0)