Below is a reduced example of something my akka-http 10.1.x code is doing, but no longer works in 10.2.x because of the ParamMagent / ParamSpec change. There’s no mention of how to migrate this in the migration guide, and I think think that would be a useful addition.
The basic case is that I have is a val tuple of parameters that I reuse in multiple routes. In 10.1.x, the ParamMagnet handled this. Now, I have two different problems:
-
paramsTuple
has NamedReceptacle types in it instead of ParamSpec - After adding explicit typing that the paramsTuple should have ParamSpec types instead, I get the error that I can’t pass a tuple to parameters.
def r1(): Route =
get {
val paramsTuple = (
"id".as[String],
"query".as[String].?
)
parameters(
paramsTuple
) {
(
id,
query
) =>
complete(OK, s"$id $query")
}
}
3 posts - 2 participants