Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for Bredov (0.4 sec)

  1. docs_src/custom_docs_ui/tutorial001.py

    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,
            title=app.title + " - ReDoc",
            redoc_js_url="https://unpkg.com/redoc@next/bundles/redoc.standalone.js",
        )
    
    
    @app.get("/users/{username}")
    async def read_user(username: str):
    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)
  2. docs_src/custom_docs_ui/tutorial002.py

    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,
            title=app.title + " - ReDoc",
            redoc_js_url="/static/redoc.standalone.js",
        )
    
    
    @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
    - 1.1K bytes
    - Viewed (0)
  3. tests/test_application.py

        assert "window.opener.swaggerUIRedirectOauth2" in response.text
    
    
    def test_redoc():
        response = client.get("/redoc")
        assert response.status_code == 200, response.text
        assert response.headers["content-type"] == "text/html; charset=utf-8"
        assert "redoc@next" in response.text
    
    
    def test_enum_status_code_response():
        response = client.get("/enum-status-code")
    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)
  4. tests/test_tutorial/test_conditional_openapi/test_tutorial001.py

        response = client.get("/openapi.json")
        assert response.status_code == 404, response.text
        response = client.get("/docs")
        assert response.status_code == 404, response.text
        response = client.get("/redoc")
        assert response.status_code == 404, response.text
    
    
    @needs_pydanticv2
    def test_root():
        client = get_client()
        response = client.get("/")
        assert response.status_code == 200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.8K bytes
    - Viewed (0)
  5. docs_src/metadata/tutorial003.py

    from fastapi import FastAPI
    
    app = FastAPI(docs_url="/documentation", redoc_url=None)
    
    
    @app.get("/items/")
    async def read_items():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 02 04:55:20 GMT 2020
    - 161 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_custom_docs_ui/test_tutorial001.py

        assert response.status_code == 200, response.text
        assert "window.opener.swaggerUIRedirectOauth2" in response.text
    
    
    def test_redoc_html(client: TestClient):
        response = client.get("/redoc")
        assert response.status_code == 200, response.text
        assert "https://unpkg.com/redoc@next/bundles/redoc.standalone.js" in response.text
    
    
    def test_api(client: TestClient):
        response = client.get("/users/john")
    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)
  7. tests/test_tutorial/test_custom_docs_ui/test_tutorial002.py

        assert response.status_code == 200, response.text
        assert "window.opener.swaggerUIRedirectOauth2" in response.text
    
    
    def test_redoc_html(client: TestClient):
        response = client.get("/redoc")
        assert response.status_code == 200, response.text
        assert "/static/redoc.standalone.js" in response.text
    
    
    def test_api(client: TestClient):
        response = client.get("/users/john")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 1.2K bytes
    - Viewed (0)
  8. tests/test_local_docs.py

    
    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,
        )
        body_content = html.body.decode()
        assert redoc_js_url in body_content
        assert redoc_favicon_url in body_content
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Dec 20 18:50:00 GMT 2020
    - 2.4K bytes
    - Viewed (0)
  9. fastapi/openapi/docs.py

                """
            ),
        ],
        redoc_js_url: Annotated[
            str,
            Doc(
                """
                The URL to use to load the ReDoc JavaScript.
    
                It is normally set to a CDN URL.
                """
            ),
        ] = "https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js",
        redoc_favicon_url: Annotated[
            str,
            Doc(
                """
    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)
  10. fastapi/applications.py

                    )
            if self.openapi_url and self.redoc_url:
    
                async def redoc_html(req: Request) -> HTMLResponse:
                    root_path = req.scope.get("root_path", "").rstrip("/")
                    openapi_url = root_path + self.openapi_url
                    return get_redoc_html(
                        openapi_url=openapi_url, title=f"{self.title} - ReDoc"
                    )
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
Back to top