Is your feature request related to a problem? Please describe.
Currently, the kotlin-server generator for ktor only generates stubs to be edited by the developer.
After editing these files, it becomes difficult to regenerate the routes when the API definition changes.
Describe the solution you'd like
Just like the delegate pattern supported by the java-spring generator, the solution should generate route-handlers, enforcing type-safe parameters handling and basic validation, and let the developer provide API delegates that implement the business logic.
This way, the route-handlers can be re-generated when the API definition changes without impacting the hand-written code.
Describe alternatives you've considered
The only alternative so far is to use spring-kotlin with the delegate pattern.
Additional context
N/A
Is your feature request related to a problem? Please describe.
Currently, the kotlin-server generator for ktor only generates stubs to be edited by the developer.
After editing these files, it becomes difficult to regenerate the routes when the API definition changes.
Describe the solution you'd like
Just like the delegate pattern supported by the java-spring generator, the solution should generate route-handlers, enforcing type-safe parameters handling and basic validation, and let the developer provide API delegates that implement the business logic.
This way, the route-handlers can be re-generated when the API definition changes without impacting the hand-written code.
Describe alternatives you've considered
The only alternative so far is to use spring-kotlin with the delegate pattern.
Additional context
N/A