You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
None is not correctly serialized for certain optional query params #380
Describe the bug
In #331, we decided to allow None to be passed in optional query params and treated identically to UNSET.
However, a few cases weren't supported:
model properties
enum properties
datetime properties
I haven't done an exhaustive search so there may be others as well; potentially any types that require non-trivial JSON serialization.
To Reproduce
This can already be seen in end_to_end_tests/golden-record/my_test_api_client/api/tests/defaults_tests_defaults_post.py:90, which will crash if None is passed in for the model.
Expected behavior
For all types, if the query param is optional, None is treated as UNSET.
OpenAPI Spec File
The existing openapi.json
Desktop (please complete the following information):
changed the title [-]`None` is not correctly serialized for optional query params[/-][+]`None` is not correctly serialized for certain optional query params[/+]on Apr 7, 2021
Activity
[-]`None` is not correctly serialized for optional query params[/-][+]`None` is not correctly serialized for certain optional query params[/+]forest-benchling commentedon Apr 7, 2021
cc @dtkav @bowenwr @packyg
feat: Include both `UNSET` and `None` static types for nullable or op…
feat: Include both `UNSET` and `None` static types for nullable or op…
feat: Include both `UNSET` and `None` static types for nullable or op…
feat: Include both `UNSET` and `None` static types for nullable or op…
feat: Include both `UNSET` and `None` static types for nullable or op…
feat: Include both `UNSET` and `None` static types for nullable or op…
dbanty commentedon Aug 15, 2021
Resolved in 0.10.2