fix: go-server unresolved function NewstringFromValue for enums#17316
fix: go-server unresolved function NewstringFromValue for enums#17316wing328 merged 2 commits intoOpenAPITools:masterfrom
Conversation
|
could you help to change all previous instances of
in this particular file. I'll add the test in another PR, so that you can get the contribution |
12c518d to
827d908
Compare
|
I think the changes are incorrect should be |
|
You're right, my bad. Fixing now and just making sure this still generates the expected code on my end. |
|
Btw, if it's easier and you'd rather include this change in your PR with the test (which I greatly appreciate 🙇 ), I'm also fine with just closing this PR and leaving it to you. As much as I respect and appreciate your consideration for my contribution stats, I don't really mind, and I'm already a very happy camper if it gets resolved 😌 (and your response time is amazing btw 😃) |
|
no problem, I'll add it later LGTM @wing328 please merge. Will add tests later. tested locally |
Hi folks! I'm running into an issue with generated go-server code, and to be completely honest, I'm not 100% sure this is the fix, I just know it solves my problem, but I cannot really judge which unintended side effects it may have.
When I have an OpenAPI spec that has parameters typed as enums:
This currently generates the following code:
But that's a function that does not exist. I'm not sure this part of the template is really supposed to apply to enum values. I just know that overriding this template locally which this change, my generated code compiles. If this change makes sense, there are still different instances of
isEnumOrRefin this template, and I'm also not sure if the same change should be applied there.PR checklist
Unfortunately I cannot install Java on my machine, so this is not an option, sorry.
master(upcoming 7.1.0 minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)