[Kotlin] Fix model enum generation#6383
Conversation
|
PS I was not able to determine from which context isString is resolved. Neither CodegenModel, allowableValues nor enumVars have such an attribute. Could someone point out to from which context this is taken? |
Would adding the model debug help when generating the client? |
|
Yes, thanks, that helped. So basically isString is not in the hierarchy of any contexts, but the quotation marks are added by toEnumValue. I updated the pull request accordingly. |
Run postProcessModelsEnum on model enums, so that enumVars get populated, and fix the model enum template.
|
Kotlin is using |
…6421) * Revert "Make the Rust codegen compile. (#6411)" This reverts commit 60766c6. * Revert "[Kotlin] Fix model enum generation (#6383)" This reverts commit adf5d64. * Revert "Global namespaces for ruby basic types (#6418)" This reverts commit 070894d. * Revert "add ehyche to swift tech comm" This reverts commit 5c62ba1. * Revert "[python-client] Thread pool fix (#6396)" This reverts commit a28ce0b. * Revert "update retrofit2 petstore samples" This reverts commit 0f1a61d. * Revert "Retrofit2: Return ResponseBody if response if file. (#6407)" This reverts commit 481c040.
|
Why was this reverted? |
|
@Bijnagte it's not reverted and I can find the code change covered by this PR in the latest master: https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/KotlinClientCodegen.java#L385-L388 |
Run postProcessModelsEnum on model enums, so that enumVars get populated,
and fix the model enum template.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\.3.0.0branch for breaking (non-backward compatible) changes.Description of the PR
see above