- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for OPENAPI_URL (0.15 sec)
-
tests/test_local_docs.py
html = get_redoc_html(openapi_url="/docs", title="title") body_content = html.body.decode() assert redoc_js_url in body_content assert redoc_favicon_url in body_content def test_strings_in_custom_redoc(): redoc_js_url = "fake_redoc_file.js" redoc_favicon_url = "fake_redoc_file.png" html = get_redoc_html( openapi_url="/docs", title="title",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Dec 20 18:50:00 UTC 2020 - 2.4K bytes - Viewed (0) -
docs/de/docs/how-to/conditional-openapi.md
``` Hier deklarieren wir die Einstellung `openapi_url` mit dem gleichen Defaultwert `"/openapi.json"`. Und dann verwenden wir das beim Erstellen der `FastAPI`-App. Dann könnten Sie OpenAPI (einschließlich der Dokumentationsoberflächen) deaktivieren, indem Sie die Umgebungsvariable `OPENAPI_URL` auf einen leeren String setzen, wie zum Beispiel: <div class="termy"> ```console $ OPENAPI_URL= uvicorn main:app
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.8K bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial001.py
) 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", oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url, swagger_js_url="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js",
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_src/conditional_openapi/tutorial001.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 281 bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial002.py
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( openapi_url=app.openapi_url, title=app.title + " - Swagger UI", oauth2_redirect_url=app.swagger_ui_oauth2_redirect_url, swagger_js_url="/static/swagger-ui-bundle.js", swagger_css_url="/static/swagger-ui.css",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 19 19:54:04 UTC 2023 - 1.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. This is normally done automatically by FastAPI using the default URL
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu May 23 22:59:02 UTC 2024 - 10.1K bytes - Viewed (0) -
docs/ja/docs/how-to/conditional-openapi.md
例えば、 ```Python hl_lines="6 11" {!../../docs_src/conditional_openapi/tutorial001.py!} ``` ここでは `openapi_url` の設定を、デフォルトの `"/openapi.json"` のまま宣言しています。 そして、これを `FastAPI` appを作る際に使います。 それから、以下のように `OPENAPI_URL` という環境変数を空文字列に設定することによってOpenAPI (UIドキュメントを含む) を無効化することができます。 <div class="termy"> ```console $ OPENAPI_URL= uvicorn main:app
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.1K bytes - Viewed (0) -
docs_src/metadata/tutorial002.py
from fastapi import FastAPI app = FastAPI(openapi_url="/api/v1/openapi.json") @app.get("/items/") async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 02 04:55:20 UTC 2020 - 154 bytes - Viewed (0) -
docs/pt/docs/how-to/conditional-openapi.md
``` Aqui declaramos a configuração `openapi_url` com o mesmo padrão de `"/openapi.json"`. E então o usamos ao criar o aplicativo `FastAPI`. Então você pode desabilitar o OpenAPI (incluindo os documentos da interface do usuário) definindo a variável de ambiente `OPENAPI_URL` como uma string vazia, como: <div class="termy"> ```console $ OPENAPI_URL= uvicorn main:app
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/ru/docs/tutorial/metadata.md
Но вы можете изменить это с помощью параметра `openapi_url`. К примеру, чтобы задать её отображение по адресу `/api/v1/openapi.json`: ```Python hl_lines="3" {!../../docs_src/metadata/tutorial002.py!} ``` Если вы хотите отключить схему OpenAPI полностью, вы можете задать `openapi_url=None`, это также отключит пользовательские интерфейсы документации, которые его использует.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.3K bytes - Viewed (0)