Support optional singleRequestParameter
Fixes https://github.com/OpenAPITools/openapi-generator/issues/18456. Add optional chaining to singleRequestParameter, if all parameters are optional.
https://github.com/OpenAPITools/openapi-generator/actions/runs/8798721887/job/24147516590?pr=18467 already fixed in the master
cc TypeScript technical committee for review
@TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04)
https://github.com/OpenAPITools/openapi-generator/actions/runs/8798721887/job/24147516590?pr=18467 already fixed in the master
Woohoo 🥳 Deployment estimations? Or: when will it hit https://hub.docker.com/r/openapitools/openapi-generator-cli? Doesn't seam to be part of 7.6.0-Snapshot, yet.
Woohoo 🥳 Deployment estimations? Or: when will it hit https://hub.docker.com/r/openapitools/openapi-generator-cli? Doesn't seam to be part of 7.6.0-Snapshot, yet.
i think it should soon be part of the snapshot
Woohoo 🥳 Deployment estimations? Or: when will it hit https://hub.docker.com/r/openapitools/openapi-generator-cli? Doesn't seam to be part of 7.6.0-Snapshot, yet.
i think it should soon be part of the snapshot
What kind of soon are you talking about? Minutes? Hours? Days? Thank you! :)
https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/7.6.0-SNAPSHOT/
So... Shouldn't it be part of the image, yet?
Edit: oh my ... was just my compose file not pulling the latest latest version ... everythings fine, ty!
Hi @angelaki, your change doesn't make any sense, because CodegenModel hasRequiredVars is never actually initialized. It's always false. Since your changes, all my singleRequestParameter are generated as optional parameter, even though they do actually have required parameters...
There is another property hasRequiredParams, which might be what you were looking for - at least it works for me. Could you test if that solves your original issue?
Haha... yes, that explains a lot. I lately noticed that all arguments are optional now (what imho is still better than the old behavior, where I had to but an empty object with thousant of call that don't have any mandatory parameters) and wanted to check it these days.
@wing328 did that change and recommended to use that value, maybe ask him?