I am new to Akka HTTP and I wanted to make route for this -> server/company/:company/authority/:authority/user/:user/region/:region/:regionId/:planTypes
I have made a route like this ->
val route: Route = get {
pathPrefix("/server") {
pathPrefix("/company") {
parameter('company) { company =>
pathPrefix("/authority") {
parameter('authority) { authority =>
pathPrefix("user") {
parameter('user) { user =>
pathPrefix("region") {
parameters('region, 'regionId, 'planType) {
(region, regionId, planType) =>
comleteRequest(tenant, authority, user, region, regionId, planType)
}
}
}
}
}
}
}
}
}
}
but this looks ugly. Is there a better and shorter way to write it.