https://kotlinlang.org logo
Title
r

ribesg

06/07/2022, 8:22 AM
If I want to define resources for routes starting with the same path, I need to put everything in the same class? https://ktor.io/docs/type-safe-routing.html
a

Aleksei Tirman [JB]

06/07/2022, 9:47 AM
You need to write nested classes to share the same path among them.
r

ribesg

06/07/2022, 10:09 AM
Yeah that’s not good. The plugin is kinda bad in the real world overall, I won’t use it I think. Or maybe without the whole nesting and
parent
stuff, that feels wrong.
I’m trying to find a great, clear way to define an API client library for a real-world not-really-REST-but-trying API with a lot of endpoints, so that the code is clear and understandable and discoverable, and I don’t think the resources plugin helps