Added fix for HAPI CDS Hooks request extensions element json parsing error
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
package ca.uhn.fhir.jpa.starter.cdshooks;
|
||||||
|
|
||||||
|
import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestJson;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties({ "extension" })
|
||||||
|
public class CdsHooksRequest extends CdsServiceRequestJson {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -86,7 +86,7 @@ public class CdsHooksServlet extends HttpServlet {
|
|||||||
String service = request.getPathInfo().replace("/", "");
|
String service = request.getPathInfo().replace("/", "");
|
||||||
|
|
||||||
String requestJson = request.getReader().lines().collect(Collectors.joining());
|
String requestJson = request.getReader().lines().collect(Collectors.joining());
|
||||||
CdsServiceRequestJson cdsHooksRequest = objectMapper.readValue(requestJson, CdsServiceRequestJson.class);
|
CdsHooksRequest cdsHooksRequest = objectMapper.readValue(requestJson, CdsHooksRequest.class);
|
||||||
logRequestInfo(cdsHooksRequest, requestJson);
|
logRequestInfo(cdsHooksRequest, requestJson);
|
||||||
|
|
||||||
CdsServiceResponseJson serviceResponseJson = cdsServiceRegistry.callService(service, cdsHooksRequest);
|
CdsServiceResponseJson serviceResponseJson = cdsServiceRegistry.callService(service, cdsHooksRequest);
|
||||||
|
|||||||
Reference in New Issue
Block a user