Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for openapi_prefix (0.22 sec)

  1. tests/test_deprecated_openapi_prefix.py

    from fastapi import FastAPI, Request
    from fastapi.testclient import TestClient
    
    app = FastAPI(openapi_prefix="/api/v1")
    
    
    @app.get("/app")
    def read_main(request: Request):
        return {"message": "Hello World", "root_path": request.scope.get("root_path")}
    
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  2. fastapi/applications.py

                assert self.version, "A version must be provided for OpenAPI, e.g.: '2.1.0'"
            # TODO: remove when discarding the openapi_prefix parameter
            if openapi_prefix:
                logger.warning(
                    '"openapi_prefix" has been deprecated in favor of "root_path", which '
                    "follows more closely the ASGI standard, is simpler, and more "
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Sat May 18 00:48:03 UTC 2024
    - 172.2K bytes
    - Viewed (0)
  3. docs/en/docs/release-notes.md

        * Deprecate `openapi_prefix` parameter in favor of the new `root_path` parameter.
        * Add new/updated docs for [Sub Applications - Mounts](https://fastapi.tiangolo.com/advanced/sub-applications/), without `openapi_prefix` (as it is now handled automatically).
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Jun 14 15:07:37 UTC 2024
    - 395.4K bytes
    - Viewed (0)
Back to top