[Python] Nullable bugfix in model.mustache
Description of the PR
Before bugfix: a required and nullable attribute set to null/None causes a ValueError when received by the client. After bugfix: This error is only caused for properties being required and not nullable General info: The python client cannot distinguish between unset attributes (value=None) and attributes set to null (value=None)
Issue to solve with a good description of the bug:
closes: https://github.com/swagger-api/swagger-codegen/issues/10535 closes: https://github.com/swagger-api/swagger-codegen/issues/8710
PR checklist
- [x] Read the contribution guidelines.
- [x] Copied the technical committee to review the pull request if your PR is targeting a particular programming language. @kenjones-cisco
Performed tests:
Tested with own api-specs and the swagger-cli:
- The generation works.
- The two lines causing the error are removed in the python client, nothing else changes.
Hi, any update on this? Do you know when it will be merged? Thank you (:
Hi, any update on this? Do you know when it will be merged? Thank you (:
Sorry, I would love to see it merged, but do not know get the maintainers to do it.
Hi, any update on this? Do you know when it will be merged? Thank you (:
Sorry, I would love to see it merged, but do not know get the maintainers to do it.
I don't know if it may be relevant, but from the PR preview it looks like there are missing tasks required to close it

Any idea on how to fix this? I guess all 4 must be checked before the PR can be merged
Any idea on how to fix this? I guess all 4 must be checked before the PR can be merged
The tasks are one for each checkbox in the PR description. They are not necessary to get it merged, see https://github.com/swagger-api/swagger-codegen/pull/10985.
I guess the issue is rather that @kenjones-cisco did not find the time to review and he's responsible for the python part: https://github.com/swagger-api/swagger-codegen/#swagger-codegen-technical-committee
Any progress here? Does something need to be changed in this PR or not to be good to merge and fix this problem? Thanks for the info!
Any progress here? Does something need to be changed in this PR or not to be good to merge and fix this problem? Thanks for the info!
I guess the problem is that @kenjones-cisco is still not active. Perhaps you could update us here @HugoMario, as you have been the last to update this file, according to the git blame.
I just ran into this problem as well, would be great if we can get this merged and released. I will have to work around it by just removing all the required attributes from the JSON file before generating code, which isn't ideal.
Here is the jq command I used to do that in case anyone else wants to do the same workaround:
jq 'del(.definitions | .. | .required?)' api.json > api.processed.json
Not sure who can approve but just from the recent people who have committed code, can anyone help? @frantuma, @HugoMario, @gracekarina
How can we get this change merged? I can't believe it's been there for more than a year.
@HugoMario @keithbsb this seems like a pretty easy change for any maintainer to move along. Thoughts on helping us out?
We also ran into this bug.
Maybe @frantuma could unblock us all here? He seems to be the most recent active maintainer 😁
I'm also running into this issue.