OpenAPITools / OpenAPITools/openapi-generator
Kotlin-spring generate default implementation with InterfaceOnly equals to true
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
I am using the generator kotlin-spring and I realised a missing functionality that java generators had.
OpenApiGenerate creates a default implementation for the methods, even that I had set up the option to interfaceOnly to be true or is there any other option that I can use?
Describe the solution you'd like
Ideally the endpotins should be created as abstract. The class that will implement the generated controller should be responsible of adding the required logic.
Describe alternatives you've considered
I cannot think another approach, but I have seen this pr related with the generator for java,
https://github.com/OpenAPITools/openapi-generator/pull/3022
Additional context


Any help or solution will be very appreciate.
Thanks
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
Start at the kotlin-spring generator's handling of interfaceOnly and compare it with the Java generator and PR #3022. Run generation with interfaceOnly=true against a representative OpenAPI specification, then verify that generated controller endpoints are abstract and implementation remains with the consuming class.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, openapi, spring
- Domain
- api, backend, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100