Title: `None` is not correctly serialized for certain optional query params · Issue #380 · openapi-generators/openapi-python-client · GitHub
Open Graph Title: `None` is not correctly serialized for certain optional query params · Issue #380 · openapi-generators/openapi-python-client
X Title: `None` is not correctly serialized for certain optional query params · Issue #380 · openapi-generators/openapi-python-client
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 exh...
Open Graph 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 d...
X 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 properti...
Opengraph URL: https://github.com/openapi-generators/openapi-python-client/issues/380
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`None` is not correctly serialized for certain optional query params","articleBody":"**Describe the bug**\r\nIn https://github.com/triaxtec/openapi-python-client/pull/331, we decided to allow `None` to be passed in optional query params and treated identically to `UNSET`.\r\n\r\nHowever, a few cases weren't supported:\r\n- model properties\r\n- enum properties\r\n- datetime properties\r\n\r\nI haven't done an exhaustive search so there may be others as well; potentially any types that require non-trivial JSON serialization.\r\n\r\n**To Reproduce**\r\nThis 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.\r\n\r\n**Expected behavior**\r\nFor all types, if the query param is optional, `None` is treated as `UNSET`.\r\n\r\n**OpenAPI Spec File**\r\nThe existing `openapi.json`\r\n\r\n**Desktop (please complete the following information):**\r\n - OS: [e.g. macOS 10.15.1]\r\n - Python Version: [e.g. 3.8.0]\r\n - openapi-python-client version [e.g. 0.1.0]\r\n\r\n**Additional context**\r\n","author":{"url":"https://github.com/forest-benchling","@type":"Person","name":"forest-benchling"},"datePublished":"2021-04-07T13:49:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/380/openapi-python-client/issues/380"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1effcdac-b313-d85c-000d-c64e148e960b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A67A:64474:27370DB:3359076:69805352 |
| html-safe-nonce | 06aadbfd1c7b9ef839fa411f0e3931cd4729d47c1af2e4a0a0dd07d9519c19ef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjdBOjY0NDc0OjI3MzcwREI6MzM1OTA3Njo2OTgwNTM1MiIsInZpc2l0b3JfaWQiOiI3NjAzNDk4NjUzMDU0OTQ4MTc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 763ea0c59a24a2e817a84676a58f8d89dc9eedc9db51bad813d765eb48909183 |
| hovercard-subject-tag | issue:852430491 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openapi-generators/openapi-python-client/380/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cb303224f3b6c1b1a2f1a1f52ab903215b4be83e719121ac11cf067026dbcca1/openapi-generators/openapi-python-client/issues/380 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cb303224f3b6c1b1a2f1a1f52ab903215b4be83e719121ac11cf067026dbcca1/openapi-generators/openapi-python-client/issues/380 |
| og:image:alt | 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 d... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | forest-benchling |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| go-import | github.com/openapi-generators/openapi-python-client git https://github.com/openapi-generators/openapi-python-client.git |
| octolytics-dimension-user_id | 84925606 |
| octolytics-dimension-user_login | openapi-generators |
| octolytics-dimension-repository_id | 240776275 |
| octolytics-dimension-repository_nwo | openapi-generators/openapi-python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 240776275 |
| octolytics-dimension-repository_network_root_nwo | openapi-generators/openapi-python-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width