swagger-api / swagger-api/swagger-codegen
[Kotlin-Client] Model-Suffix and Model-Prefix not working
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
When generating code for language 'kotlin-client' the model-suffix and model-prefix parameters are not applied.
If I change the language from 'kotlin-client' to e.g. 'java' the model suffix is applied correctly.
Swagger-codegen version
- 3.0.5 (tested and not working with language: kotlin-client and kotlin-server)
- 2.4.2 (tested and not working with language: kotlin)
Swagger declaration file content or url
http://petstore.swagger.io/v2/swagger.json
Command line used for generation
swagger-codegen generate -l kotlin-client -i http://petstore.swagger.io/v2/swagger.json -Dmodels --model-name-suffix DTO
Steps to reproduce
No further steps needed for reproducing. The command from above already produces the buggy models that miss the DTO suffix.
Related issues/PRs
Suggest a fix/enhancement
Adjust model-name logic to be the same as in the java generator.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the reported swagger-codegen command against the Petstore Swagger document and compare kotlin-client and kotlin-server output with the Java generator. Trace the Kotlin model-name logic and compare it with the Java generator's handling of model-name-suffix and model-name-prefix. Done means generated Kotlin model names include the requested DTO suffix or prefix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100