get(s"/status/:statusId") { request: GetStatusRequest =>
// handle my request
}
Here is my request case class:
import javax.inject.Inject
import com.twitter.finagle.http.Request
import com.twitter.finatra.request.RouteParam
case class GetStatusRequest(
@RouteParam statusId: String,
@Inject request: Request
)Here is the error from curling my endpoint:< HTTP/1.1 400 Bad Request
< Content-Type: application/json; charset=utf-8
< Server: Finatra
< Date: Mon, 19 Sep 2016 21:44:48 GMT
< Content-Length: 43
<
* Connection #0 to host localhost left intact
{"errors":["status_id: field is required"]}
If I change "statusId" in both places to "id" or "pickle" the route param is parsed fine... if it's named "clientId" or "statusId" (probably others) I get bad request errors.What am I missing here? seems like strange behavior.I'm usingscalaVersion=2.11.8
finatraVersion=2.4.0
case class field names should match the request parameters or use the @JsonProperty annotation to specify the JSON field name in the case class (see: example). APropertyNamingStrategy can be configured to handle common name substitutions (e.g. snake_case or camelCase). By default, snake_case is used (defaults are set inFinatraJacksonModule).--
You received this message because you are subscribed to the Google Groups "finatra-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to finatra-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thecase classfield names should match the request parameters
To unsubscribe from this group and stop receiving emails from it, send an email to finatra-user...@googlegroups.com.
case class field names should match the request parameters or use the @JsonProperty annotation to specify the JSON field name in the case class (see: example). A PropertyNamingStrategy can be configured to handle common name substitutions (e.g. snake_case or camelCase). By default, snake_case is used (defaults are set inFinatraJacksonModule).--
You received this message because you are subscribed to the Google Groups "finatra-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to finatra-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to finatra-user...@googlegroups.com.