OptionalMultiQueryParamDecoderMatcher

abstract class OptionalMultiQueryParamDecoderMatcher[T](name: String)(`evidence$6`: QueryParamDecoder[T])

Capture a query parameter that appears 0 or more times.

Capture a query parameter that appears 0 or more times.

 case class Foo(i: Int)
 implicit val fooDecoder: QueryParamDecoder[Foo] = ...
 implicit val fooParam: QueryParam[Foo] = ...

 object FooMatcher extends OptionalMultiQueryParamDecoderMatcher[Foo]("foo")
 val routes = HttpRoutes.of {
   // matches http://.../closest?foo=2&foo=3&foo=4
   case GET -> Root / "closest" :? FooMatcher(Validated.Valid(Seq(Foo(2),Foo(3),Foo(4)))) => ...

   /*
   *  matches http://.../closest?foo=2&foo=3&foo=4 as well as http://.../closest (no parameters)
   *  or http://.../closest?foo=2 (single occurrence)
   */
   case GET -> Root / "closest" :? FooMatcher(is) => ...
class Object
trait Matchable
class Any

Value members

Concrete methods

def unapply(params: Map[String, Seq[String]]): Option[ValidatedNel[ParseFailure, List[T]]]