Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 14 for get_swagger_ui_html (0.22 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_swagger_ui_escape.py

    from fastapi.openapi.docs import get_swagger_ui_html
    
    
    def test_init_oauth_html_chars_are_escaped():
        xss_payload = "Evil</script><script>alert(1)</script>"
        html = get_swagger_ui_html(
            openapi_url="/openapi.json",
            title="Test",
            init_oauth={"appName": xss_payload},
        )
        body = html.body.decode()
    
        assert "</script><script>" not in body
        assert "\\u003c/script\\u003e\\u003cscript\\u003e" in body
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 24 09:28:10 GMT 2026
    - 1.1K bytes
    - Click Count (0)
  2. docs_src/custom_docs_ui/tutorial002_py310.py

    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(
            openapi_url=app.openapi_url,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1.1K bytes
    - Click Count (0)
  3. docs_src/custom_docs_ui/tutorial001_py310.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 Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1.1K bytes
    - Click Count (0)
  4. 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.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 2.8K bytes
    - Click Count (0)
  5. docs/zh/docs/how-to/configure-swagger-ui.md

    # 配置 Swagger UI { #configure-swagger-ui }
    
    你可以配置一些额外的 [Swagger UI 参数](https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/)。
    
    如果需要配置它们,可以在创建 `FastAPI()` 应用对象时或调用 `get_swagger_ui_html()` 函数时传递 `swagger_ui_parameters` 参数。
    
    `swagger_ui_parameters` 接受一个字典,该字典会直接传递给 Swagger UI。
    
    FastAPI会将这些配置转换为 **JSON**,使其与 JavaScript 兼容,因为这是 Swagger UI 需要的。
    
    ## 禁用语法高亮 { #disable-syntax-highlighting }
    
    比如,你可以禁用 Swagger UI 中的语法高亮。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 2.7K bytes
    - Click Count (0)
  6. docs/ko/docs/how-to/configure-swagger-ui.md

    # Swagger UI 구성 { #configure-swagger-ui }
    
    추가적인 [Swagger UI 매개변수](https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/)를 구성할 수 있습니다.
    
    구성을 하려면, `FastAPI()` 앱 객체를 생성할 때 또는 `get_swagger_ui_html()` 함수에 `swagger_ui_parameters` 인수를 전달하십시오.
    
    `swagger_ui_parameters`는 Swagger UI에 직접 전달된 구성을 포함하는 딕셔너리를 받습니다.
    
    FastAPI는 이 구성을 **JSON** 형식으로 변환하여 JavaScript와 호환되도록 합니다. 이는 Swagger UI에서 필요로 하는 형식입니다.
    
    ## 구문 강조 비활성화 { #disable-syntax-highlighting }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 3.2K bytes
    - Click Count (0)
  7. docs/zh-hant/docs/how-to/configure-swagger-ui.md

    # 設定 Swagger UI { #configure-swagger-ui }
    
    你可以設定一些額外的 [Swagger UI 參數](https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/)。
    
    要設定它們,建立 `FastAPI()` 應用物件時,或呼叫 `get_swagger_ui_html()` 函式時,傳入參數 `swagger_ui_parameters`。
    
    `swagger_ui_parameters` 接受一個 dict,內容會直接傳給 Swagger UI 作為設定。
    
    FastAPI 會把這些設定轉換成 **JSON**,以便與 JavaScript 相容,因為 Swagger UI 需要的是這種格式。
    
    ## 停用語法醒目提示 { #disable-syntax-highlighting }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 2.7K bytes
    - Click Count (0)
  8. 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.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 24 09:28:10 GMT 2026
    - 12.1K bytes
    - Click Count (0)
  9. docs/tr/docs/how-to/configure-swagger-ui.md

    Bazı ek [Swagger UI parametrelerini](https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/) yapılandırabilirsiniz.
    
    Bunları yapılandırmak için, `FastAPI()` uygulama nesnesini oluştururken ya da `get_swagger_ui_html()` fonksiyonuna `swagger_ui_parameters` argümanını verin.
    
    `swagger_ui_parameters`, Swagger UI'ye doğrudan iletilecek yapılandırmaları içeren bir `dict` alır.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 3.2K bytes
    - Click Count (0)
  10. docs/uk/docs/how-to/configure-swagger-ui.md

    Щоб їх налаштувати, передайте аргумент `swagger_ui_parameters` під час створення об’єкта додатка `FastAPI()` або до функції `get_swagger_ui_html()`.
    
    `swagger_ui_parameters` отримує словник із налаштуваннями, що передаються безпосередньо до Swagger UI.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 4.2K bytes
    - Click Count (0)
Back to Top