In order to support the syntax I would like, I have decided to fork the lambda-kotlin-request-router. The code change wasn't too complicated - just an additional type check and a bit more logic - but I had to make some tweaks to the project structure too to fix building and deploying. The fork is available on github. I'm not entirely sure of the legality of this, but the source is under the Apache 2.0 License which allows modification and redistribution. But for my own private purposes, I am sure it's fine.
There is a weakness - it relies on an experimental feature of Kotlin which is going to be removed from the language at some point. So it does have a limited shelf life.
I have enough to get going though, to build a RESTful API to my application. I've deployed and tested a basic route.
Next step is to add DI - dependency injection - and for that I will be using the Koin library. It's also a chance to start writing interfaces and implementations for the AWS access functions, to hide some of the complexity of making requests to AWS S3, for instance. I am not sure if I should put the interfaces and implementations in the SharedModels module, or in a new module. Is there such as thing as too many modules?
Prev: Starting the API Next: Serializing Failures