Open
Description
If we have a resource class like this:
public class UserResource {
private long id;
private long accountId;
private String name;
}
If we want to populate id
and name
fields from JSON and accountId
from request param, this doesn't work:
@Post("/accounts/{user.accountId}
@Consumes("application/json")
public void addUser(User user) {
//user.getAccountId() will be null
}
I believe that we should deserialize the class from the JSON and if there is any path param, we should override the value in the deserialized resource.