-
-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
🐞bugSomething isn't workingSomething isn't working
Milestone
Description
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):
- OS: [e.g. macOS 10.15.1]
- Python Version: [e.g. 3.8.0]
- openapi-python-client version [e.g. 0.1.0]
Additional context
Metadata
Metadata
Assignees
Labels
🐞bugSomething isn't workingSomething isn't working