diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 00769e728..08c82f173 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -292,7 +292,7 @@ def get_dependant( if isinstance(inner, ForwardRef): inner = evaluate_forwardref(inner, globalns, globalns) args[0] = inner - annotation = Annotated[inner, *args[1:]] # ✅ correct reconstruction + annotation = Annotated[inner, *args[1:]] param = param.replace(annotation=annotation) is_path_param = param_name in path_param_names