Skip to content

Commit 2d1c136

Browse files
authored
bugfix: add alias support to expected list params
The input alias should be used when generating the list of expected list params. If not the inputs will be skipped by line 105.
1 parent 3bac6f0 commit 2d1c136

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_parameter_validation/parameter_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async def nested_func(**kwargs):
6262
expected_list_params = []
6363
for name, param in expected_inputs.items():
6464
if str(param.annotation).startswith("typing.List") or str(param.annotation).startswith("typing.Optional[typing.List"):
65-
expected_list_params.append(name)
65+
expected_list_params.append(param.default.alias or name)
6666

6767
# Step 4 - Convert request inputs to dicts
6868
request_inputs = {

0 commit comments

Comments
 (0)