- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for ui (0.18 sec)
-
tests/test_swagger_ui_init_oauth.py
from fastapi import FastAPI from fastapi.testclient import TestClient swagger_ui_init_oauth = {"clientId": "the-foo-clients", "appName": "The Predendapp"} app = FastAPI(swagger_ui_init_oauth=swagger_ui_init_oauth) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sun Aug 09 10:54:05 GMT 2020 - 718 bytes - Viewed (0) -
tests/test_custom_swagger_ui_redirect.py
from fastapi import FastAPI from fastapi.testclient import TestClient swagger_ui_oauth2_redirect_url = "/docs/redirect" app = FastAPI(swagger_ui_oauth2_redirect_url=swagger_ui_oauth2_redirect_url) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 1.1K bytes - Viewed (0) -
tests/test_no_swagger_ui_redirect.py
app = FastAPI(swagger_ui_oauth2_redirect_url=None) @app.get("/items/") async def read_items(): return {"id": "foo"} client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert response.headers["content-type"] == "text/html; charset=utf-8" assert "swagger-ui-dist" in response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 786 bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial001.py
swagger_css_url="https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui.css", ) @app.get(app.swagger_ui_oauth2_redirect_url, include_in_schema=False) async def swagger_ui_redirect(): return get_swagger_ui_oauth2_redirect_html() @app.get("/redoc", include_in_schema=False) async def redoc_html(): return get_redoc_html( openapi_url=app.openapi_url,
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Oct 30 09:58:58 GMT 2023 - 1.1K bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial002.py
oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url, swagger_js_url="/static/swagger-ui-bundle.js", swagger_css_url="/static/swagger-ui.css", ) @app.get(app.swagger_ui_oauth2_redirect_url, include_in_schema=False) async def swagger_ui_redirect(): return get_swagger_ui_oauth2_redirect_html() @app.get("/redoc", include_in_schema=False) async def redoc_html():
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_configure_swagger_ui/test_tutorial001.py
from docs_src.configure_swagger_ui.tutorial001 import app client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert ( '"syntaxHighlight": false' in response.text ), "syntaxHighlight should be included and converted to JSON" assert ( '"dom_id": "#swagger-ui"' in response.text
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 1.4K bytes - Viewed (0) -
docs_src/configure_swagger_ui/tutorial003.py
from fastapi import FastAPI app = FastAPI(swagger_ui_parameters={"deepLinking": False}) @app.get("/users/{username}") async def read_user(username: str):
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 201 bytes - Viewed (0) -
tests/test_application.py
assert response.status_code == expected_status assert response.json() == expected_response def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert response.headers["content-type"] == "text/html; charset=utf-8" assert "swagger-ui-dist" in response.text assert ( "oauth2RedirectUrl: window.location.origin + '/docs/oauth2-redirect'"
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Thu Apr 18 21:56:59 GMT 2024 - 52.2K bytes - Viewed (0) -
fastapi/openapi/docs.py
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 10.1K bytes - Viewed (0) -
tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py
static_dir.mkdir(exist_ok=True) from docs_src.custom_docs_ui.tutorial001 import app with TestClient(app) as client: yield client static_dir.rmdir() def test_swagger_ui_html(client: TestClient): response = client.get("/docs") assert response.status_code == 200, response.text assert ( "https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui-bundle.js" in response.text )
Python - Registered: Sun Apr 28 07:19:10 GMT 2024 - Last Modified: Mon Oct 30 09:58:58 GMT 2023 - 1.3K bytes - Viewed (0)