- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for test_swagger_ui_html (0.16 sec)
-
tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py
print(static_dir) 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/swagger-ui-bundle.js" in response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu May 23 22:59:02 UTC 2024 - 1.3K bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial001.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",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu May 23 22:59:02 UTC 2024 - 1.1K bytes - Viewed (0) -
docs/en/docs/how-to/configure-swagger-ui.md
To configure them, pass the `swagger_ui_parameters` argument when creating the `FastAPI()` app object or to the `get_swagger_ui_html()` function. `swagger_ui_parameters` receives a dictionary with the configurations passed to Swagger UI directly.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 16:50:52 UTC 2024 - 2.7K bytes - Viewed (0) -
docs/zh/docs/how-to/configure-swagger-ui.md
# 配置 Swagger UI 你可以配置一些额外的 <a href="https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/" class="external-link" target="_blank">Swagger UI 参数</a>. 如果需要配置它们,可以在创建 `FastAPI()` 应用对象时或调用 `get_swagger_ui_html()` 函数时传递 `swagger_ui_parameters` 参数。 `swagger_ui_parameters` 接受一个直接传递给 Swagger UI的字典,包含配置参数键值对。 FastAPI会将这些配置转换为 **JSON**,使其与 JavaScript 兼容,因为这是 Swagger UI 需要的。 ## 不使用语法高亮 比如,你可以禁用 Swagger UI 中的语法高亮。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.6K bytes - Viewed (0) -
docs/de/docs/how-to/configure-swagger-ui.md
Um diese zu konfigurieren, übergeben Sie das Argument `swagger_ui_parameters` beim Erstellen des `FastAPI()`-App-Objekts oder an die Funktion `get_swagger_ui_html()`. `swagger_ui_parameters` empfängt ein Dict mit den Konfigurationen, die direkt an die Swagger-Oberfläche übergeben werden.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.3K bytes - Viewed (0) -
docs/pt/docs/how-to/configure-swagger-ui.md
Para configurá-los, passe o argumento `swagger_ui_parameters` ao criar o objeto de aplicativo `FastAPI()` ou para a função `get_swagger_ui_html()`. `swagger_ui_parameters` recebe um dicionário com as configurações passadas diretamente para o Swagger UI.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.1K bytes - Viewed (0) -
fastapi/openapi/docs.py
""" ), ] = { "dom_id": "#swagger-ui", "layout": "BaseLayout", "deepLinking": True, "showExtensions": True, "showCommonExtensions": True, } def get_swagger_ui_html( *, openapi_url: Annotated[ str, Doc( """ The OpenAPI URL that Swagger UI should load and use.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu May 23 22:59:02 UTC 2024 - 10.1K bytes - Viewed (0) -
fastapi/applications.py
) from fastapi.exceptions import RequestValidationError, WebSocketRequestValidationError from fastapi.logger import logger 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
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 17 04:52:31 UTC 2024 - 172.2K bytes - Viewed (0)