@RequestScoped
@SuppressWarnings({"rawtypes", "unchecked"})
@Provides
public RestRequestBase getRestRequest(GsonBuilder gsonBuilder, RestCallSpec callSpec,
CallPath callPath, HttpServletRequest request, ResourceIdFactory<Id<?>> idFactory) {
RestRequestBaseReceiver requestReceiver =
new RestRequestBaseReceiver(gsonBuilder, callSpec.getRequestSpec());
return requestReceiver.receive(request, idFactory.createId(callPath.getResourceId()));
}