diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py index 6732a1876..3288592c7 100644 --- a/fastapi/dependencies/utils.py +++ b/fastapi/dependencies/utils.py @@ -158,12 +158,12 @@ def get_flat_dependant( body_params=dependant.body_params.copy(), name=dependant.name, call=dependant.call, - request_param_name=dependant.request_param_name, - websocket_param_name=dependant.websocket_param_name, - http_connection_param_name=dependant.http_connection_param_name, - response_param_name=dependant.response_param_name, - background_tasks_param_name=dependant.background_tasks_param_name, - security_scopes_param_name=dependant.security_scopes_param_name, + request_param_names=dependant.request_param_names.copy(), + websocket_param_names=dependant.websocket_param_names.copy(), + http_connection_param_names=dependant.http_connection_param_names.copy(), + response_param_names=dependant.response_param_names.copy(), + background_tasks_param_names=dependant.background_tasks_param_names.copy(), + security_scopes_param_names=dependant.security_scopes_param_names.copy(), own_oauth_scopes=dependant.own_oauth_scopes, parent_oauth_scopes=use_parent_oauth_scopes, use_cache=dependant.use_cache,