You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
apiNameSuffix setting gets ignored when using generatorName = "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:
generatorName: kotlinapiNameSuffix: 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
Activity
manujell73 commentedon May 19, 2026
I also noticed that the
apiNamePrefixproperty also does not get used for the kotlin generation.fix(Kotlin): use the global apiNamePrefix and apiNameSuffix settings (O…
fix(Kotlin): make the credential providers assignable and fix docs (O…
feat(kotlin-client): support dynamic auth credentials for okhttp clie…
fix(Kotlin): use the global apiNamePrefix and apiNameSuffix settings (O…
fix(Kotlin): use the global apiNamePrefix and apiNameSuffix settings (#…