Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 26 of 26 for root_path (0.04 sec)

  1. tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py

    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_behind_a_proxy/test_tutorial003.py

    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  3. fastapi/applications.py

                async def openapi(req: Request) -> JSONResponse:
                    root_path = req.scope.get("root_path", "").rstrip("/")
                    if root_path not in server_urls:
                        if root_path and self.root_path_in_servers:
                            self.servers.insert(0, {"url": root_path})
                            server_urls.add(root_path)
                    return JSONResponse(self.openapi())
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 176.3K bytes
    - Viewed (0)
  4. fastapi/routing.py

                if dependant.call
                else EndpointContext()
            )
    
            if dependant.path:
                # For mounted sub-apps, include the mount path prefix
                mount_path = request.scope.get("root_path", "").rstrip("/")
                endpoint_ctx["path"] = f"{request.method} {mount_path}{dependant.path}"
    
            # Read body and auto-close files
            try:
                body: Any = None
                if body_field:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
  5. docs/en/docs/release-notes.md

    ## 0.56.0
    
    * Add support for ASGI `root_path`:
        * Use `root_path` internally for mounted applications, so that OpenAPI and the docs UI works automatically without extra configurations and parameters.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:06:15 UTC 2025
    - 586.7K bytes
    - Viewed (0)
  6. scripts/translate.py

            f"Path must be inside {en_docs_path}"
        )
        out_path = generate_lang_path(lang=language, path=en_path)
        out_path.parent.mkdir(parents=True, exist_ok=True)
        original_content = en_path.read_text(encoding="utf-8")
        old_translation: str | None = None
        if out_path.exists():
            print(f"Found existing translation: {out_path}")
            old_translation = out_path.read_text(encoding="utf-8")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:05:53 UTC 2025
    - 34.1K bytes
    - Viewed (0)
Back to top