fastapi/tests/test_tutorial/test_custom_request_and_route
Purushot14 3c1d6ebf9f feat: Add support for custom APIRoute and APIRouter in FastAPI
- Introduced `route_class` and `router_class` parameters to allow custom route and router classes.
- Updated `FastAPI` initialization to use the provided `router_class` and `route_class`.
- Modified webhook initialization to respect the custom router class.
- Added test cases to validate:
  - Custom `route_class` and `router_class` usage.
  - Route naming consistency.
  - Presence of `X-Response-Time` header in responses.

This enhances FastAPI’s flexibility, allowing users to customize route handling and routing behavior.
2025-03-13 00:09:00 +05:30
..
__init__.py Add better support for request body access/manipulation with custom classes (#589) 2019-10-04 19:23:34 -05:00
test_tutorial001.py ⬆ Upgrade Starlette to `0.21.0`, including the new [`TestClient` based on HTTPX](https://github.com/encode/starlette/releases/tag/0.21.0) (#5471) 2022-11-13 15:26:09 +01:00
test_tutorial002.py Add support for Pydantic's 2.7 new deprecated Field parameter, remove URL from validation errors response (#11461) 2024-04-18 14:40:57 -05:00
test_tutorial003.py ⬆ Upgrade isort to version 5.x.x (#1670) 2020-07-09 20:06:12 +02:00
test_tutorial004.py feat: Add support for custom APIRoute and APIRouter in FastAPI 2025-03-13 00:09:00 +05:30