From 0022fc77c09858413148626fbb0581ea6f808560 Mon Sep 17 00:00:00 2001 From: Alexey Kotenko Date: Mon, 29 Jan 2024 18:48:53 +0000 Subject: [PATCH] Add args/kwargs to put route --- fastapi/applications.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fastapi/applications.py b/fastapi/applications.py index 0be6423ae..393d25173 100644 --- a/fastapi/applications.py +++ b/fastapi/applications.py @@ -1845,7 +1845,6 @@ class FastAPI(Starlette): """ ), ], - *, response_model: Annotated[ Any, Doc( @@ -2164,6 +2163,8 @@ class FastAPI(Starlette): """ ), ] = Default(generate_unique_id), + *args: Any, + **kwargs: Any ) -> Callable[[DecoratedCallable], DecoratedCallable]: """ Add a *path operation* using an HTTP PUT operation. @@ -2209,6 +2210,8 @@ class FastAPI(Starlette): callbacks=callbacks, openapi_extra=openapi_extra, generate_unique_id_function=generate_unique_id_function, + *args, + **kwargs ) def post(