Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for openapi_prefix (0.05 seconds)

  1. tests/test_deprecated_openapi_prefix.py

    from fastapi import FastAPI, Request
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    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
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 1.3K bytes
    - Click Count (0)
Back to Top