Bug Report Checklist
Description
apiNameSuffix setting gets ignored when using generatorName = "kotlin"
It does use the configOption apiSuffix.
openapi-generator version
7.22.0
OpenAPI declaration file content or url
Not really any specific file content, just overall Kotlin Api generation
Generation Details
I am using the gradle plugin but this would be the important stuff in the yaml format:
generatorName: kotlin
apiNameSuffix: CustomApi
Steps to reproduce
- Configure OpenAPI Generator with
generatorName: kotlin.
- Set
apiNameSuffix: CustomSuffix.
- Generate code.
- Generated API class names use default
Api suffix.
- Set
additionalProperties.apiSuffix: CustomSuffix and regenerate.
- Generated API class names now use the
CustomSuffix.
Related issues/PRs
apiSuffix Kotlin implementation: #2690
apiNameSuffix global implementation: #3918
Suggest a fix
I will open a PR, but here is a description:
Remove the Kotlin specific apiSuffix property and use the global apiNameSuffix instead.
Change inside AbstractKotlinCodegen.java line 764.
Since the fix is breaking I will open the PR to the 8.0.x branch
Bug Report Checklist
Description
apiNameSuffixsetting gets ignored when usinggeneratorName = "kotlin"It does use the
configOptionapiSuffix.openapi-generator version
7.22.0
OpenAPI declaration file content or url
Not really any specific file content, just overall Kotlin Api generation
Generation Details
I am using the gradle plugin but this would be the important stuff in the yaml format:
Steps to reproduce
generatorName: kotlin.apiNameSuffix: CustomSuffix.Apisuffix.additionalProperties.apiSuffix: CustomSuffixand regenerate.CustomSuffix.Related issues/PRs
apiSuffixKotlin implementation: #2690apiNameSuffixglobal implementation: #3918Suggest a fix
I will open a PR, but here is a description:
Remove the Kotlin specific
apiSuffixproperty and use the globalapiNameSuffixinstead.Change inside
AbstractKotlinCodegen.javaline 764.Since the fix is breaking I will open the PR to the
8.0.xbranch