Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for js (0.15 sec)

  1. docs_src/custom_docs_ui/tutorial001.py

        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.9.0/swagger-ui-bundle.js",
            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)
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Mon Oct 30 09:58:58 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  2. docs_src/custom_docs_ui/tutorial002.py

        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",
        )
    
    
    @app.get(app.swagger_ui_oauth2_redirect_url, include_in_schema=False)
    async def swagger_ui_redirect():
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py

            yield client
        static_dir.rmdir()
    
    
    def test_swagger_ui_html(client: TestClient):
        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")
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py

    
    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
        )
        assert "https://unpkg.com/swagger-ui-dist@5.9.0/swagger-ui.css" in response.text
    
    
    def test_swagger_ui_oauth2_redirect_html(client: TestClient):
        response = client.get("/docs/oauth2-redirect")
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Mon Oct 30 09:58:58 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  5. tests/test_local_docs.py

        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",
            redoc_js_url=redoc_js_url,
            redoc_favicon_url=redoc_favicon_url,
        )
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Sun Dec 20 18:50:00 GMT 2020
    - 2.4K bytes
    - Viewed (0)
  6. fastapi/openapi/docs.py

                """
            ),
        ],
        swagger_js_url: Annotated[
            str,
            Doc(
                """
                The URL to use to load the Swagger UI JavaScript.
    
                It is normally set to a CDN URL.
                """
            ),
        ] = "https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.9.0/swagger-ui-bundle.js",
        swagger_css_url: Annotated[
            str,
            Doc(
                """
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
Back to top