Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for callback_route (0.05 sec)

  1. tests/test_additional_responses_custom_model_in_callback.py

    
    class CustomModel(BaseModel):
        a: int
    
    
    app = FastAPI()
    
    callback_router = APIRouter(default_response_class=JSONResponse)
    
    
    @callback_router.get(
        "{$callback_url}/callback/", responses={400: {"model": CustomModel}}
    )
    def callback_route():
        pass  # pragma: no cover
    
    
    @app.post("/", callbacks=callback_router.routes)
    def main_route(callback_url: HttpUrl):
        pass  # pragma: no cover
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.8K bytes
    - Viewed (0)
  2. tests/test_include_router_defaults_overrides.py

        response.headers["x-level5"] = "True"
    
    
    callback_router0 = APIRouter()
    
    
    @callback_router0.get("/")
    async def callback0(level0: str):
        pass  # pragma: nocover
    
    
    callback_router1 = APIRouter()
    
    
    @callback_router1.get("/")
    async def callback1(level1: str):
        pass  # pragma: nocover
    
    
    callback_router2 = APIRouter()
    
    
    @callback_router2.get("/")
    async def callback2(level2: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 358.6K bytes
    - Viewed (0)
  3. tests/test_generate_unique_id_function.py

            },
        }
    
    
    def test_callback_override_generate_unique_id():
        app = FastAPI(generate_unique_id_function=custom_generate_unique_id)
        callback_router = APIRouter(generate_unique_id_function=custom_generate_unique_id2)
    
        @callback_router.post(
            "/post-callback",
            response_model=list[Item],
            responses={404: {"model": list[Message]}},
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 66.7K bytes
    - Viewed (0)
Back to top