mirror of https://github.com/tiangolo/fastapi.git
Fix typing for FastAPI add api route
Make typing of endpoint parameter consistent with downstream calls and other utilities.
This commit is contained in:
parent
c6437d555d
commit
c2f9db2c03
|
|
@ -294,7 +294,7 @@ class FastAPI(Starlette):
|
|||
def add_api_route(
|
||||
self,
|
||||
path: str,
|
||||
endpoint: Callable[..., Coroutine[Any, Any, Response]],
|
||||
endpoint: Callable[..., Any],
|
||||
*,
|
||||
response_model: Any = Default(None),
|
||||
status_code: Optional[int] = None,
|
||||
|
|
|
|||
Loading…
Reference in New Issue