What would be the correct way of doing subrouting with typed parameters?
I am trying to do something similar to this example in the Locations-plugin documentation:
@Location("/type/{name}") data class Type(val name: String) {
// In these classes we have to include the `name` property matching the parent.
@Location("/edit") data class Edit(val parent: Type)
@Location("/list/{page}") data class List(val parent: Type, val page: Int)
}
I assumed from the wiki-page "Basic Routing" that @Path would do the trick. However, the compiler complains that the parent parameter must be annotated with @PathParam or @QueryParam. Is there something I am missing or will I just have to repeat the full URI for all "subroutes"?
What would be the correct way of doing subrouting with typed parameters?
I am trying to do something similar to this example in the Locations-plugin documentation:
I assumed from the wiki-page "Basic Routing" that
@Path
would do the trick. However, the compiler complains that theparent
parameter must be annotated with@PathParam
or@QueryParam
. Is there something I am missing or will I just have to repeat the full URI for all "subroutes"?