I have query parameters (OData) defined on my route, for example:
parameters(('$top.as[Int].?, '$skip.as[Int].?)) { (top, skip) =>
I have the following rejection handler to handle all invalid parameters (handleAll):
RejectionHandler.newBuilder() .handleAll[MalformedQueryParamRejection] { paramRejections => // paramRejections is a Seq[MalformedQueryParamRejection] ... }
The problem is that when called with the following
some-endpoint?$top=invalid&$skip=invalid
paramRejections in the deviation handler has 2 entries, both for $ top, not one for $ top and one for $ skip.
This seems to be related to the dollar sign in terms of parameters, because when I delete this, the work is working properly. Is this a known issue or is there an affordable solution ( which does not include removing the dollar sign )?
Note. It seems that only the deviation handler has a problem with several parameters starting with the dollar sign, since this line on the route correctly assigns the top and skips the variables when $ top and $ skip are supplied with valid values ββin the URI:
parameters(('$top.as[Int].?, '$skip.as[Int].?)) { (top, skip) =>
source share