Hi, this is about routing.
Having spent a few years with the Play framework before moving to kotlin, I have several times found myself longing for the very compact and clear routes definition in Play. I find it gives me a very good overview over a server to see all its endpoints in one place. So I now created a code generator (using KSP) that will take a
routes file in the Play framework style and generate code to call my different request handlers:
https://github.com/hallyhaa/ktor-routes-codegen.
I have discussed this earlier with
@Thiago (
here). And also think this simple code-generating annotation could be facilitating migrations from Play framework to Ktor (wanted to tip Sergey Mashkov about this, but his account here is deactivated).
There is a short example of how to use this here:
https://github.com/hallyhaa/routes-file-example
Does anyone think this is practical?