Closed jramseygreen closed 11 months ago
line 167 of parameter_validation.py
# In python3.7+, typing.Optional is used instead of typing.Union[..., None]
if expected_input_type_str.startswith("typing.Optional"):
new_type = expected_input_type.__args__[0]
expected_input_type = new_type
Change to
# In python3.7+, typing.Optional is used instead of typing.Union[..., None]
if expected_input_type_str.startswith("typing.Optional"):
new_type = expected_input_type.__args__[0]
expected_input_type = new_type
expected_input_type_str = str(new_type)
fixes the issue
Closed by #33, thanks again!
When setting a parameter type to Optional[List[str]], whether I send it in the payload or not it will return error response "Parameter must be type 'typing.Optional[typing.List[str]]'"