From 1fad912193ec1da9e41dc7c46473365075446fa5 Mon Sep 17 00:00:00 2001 From: Aditya Dave Date: Wed, 18 Sep 2024 10:01:17 -0400 Subject: [PATCH] 6262 cds hooks returns 400 when extension passed in the cdsservicerequestjson (#6274) * fail test * potential fix * spotless * alternative fix * spotless * remove the new method and replace usage for the old one * spotless * fix issue with context failing deserialization * add validation for context, hook and hook instance * spotless * add message codes * spotless * changelog * cleanup * spotless * bump version to 7.5.1-SNAPSHOT --- hapi-deployable-pom/pom.xml | 2 +- hapi-fhir-android/pom.xml | 2 +- hapi-fhir-base/pom.xml | 2 +- hapi-fhir-bom/pom.xml | 4 +- hapi-fhir-checkstyle/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 2 +- hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 2 +- hapi-fhir-cli/pom.xml | 2 +- hapi-fhir-client-okhttp/pom.xml | 2 +- hapi-fhir-client/pom.xml | 2 +- hapi-fhir-converter/pom.xml | 2 +- hapi-fhir-dist/pom.xml | 2 +- hapi-fhir-docs/pom.xml | 2 +- ...tion-when-extension-passed-in-request.yaml | 4 + hapi-fhir-jacoco/pom.xml | 2 +- hapi-fhir-jaxrsserver-base/pom.xml | 2 +- hapi-fhir-jpa/pom.xml | 2 +- hapi-fhir-jpaserver-base/pom.xml | 2 +- .../pom.xml | 2 +- hapi-fhir-jpaserver-hfql/pom.xml | 2 +- hapi-fhir-jpaserver-ips/pom.xml | 2 +- hapi-fhir-jpaserver-mdm/pom.xml | 2 +- hapi-fhir-jpaserver-model/pom.xml | 2 +- hapi-fhir-jpaserver-searchparam/pom.xml | 2 +- hapi-fhir-jpaserver-subscription/pom.xml | 2 +- hapi-fhir-jpaserver-test-dstu2/pom.xml | 2 +- hapi-fhir-jpaserver-test-dstu3/pom.xml | 2 +- hapi-fhir-jpaserver-test-r4/pom.xml | 2 +- hapi-fhir-jpaserver-test-r4b/pom.xml | 2 +- hapi-fhir-jpaserver-test-r5/pom.xml | 2 +- hapi-fhir-jpaserver-test-utilities/pom.xml | 2 +- hapi-fhir-jpaserver-uhnfhirtest/pom.xml | 2 +- hapi-fhir-server-cds-hooks/pom.xml | 2 +- .../cdshooks/api/ICdsServiceRegistry.java | 2 +- .../cdshooks/api/json/CdsHooksExtension.java | 2 + .../json/CdsServiceRequestContextJson.java | 2 + .../fhir/cdshooks/config/CdsHooksConfig.java | 5 +- .../controller/CdsHooksController.java | 3 +- .../CdsServiceRequestJsonDeserializer.java | 111 ++++++----- .../cdshooks/svc/CdsServiceRegistryImpl.java | 23 +-- .../controller/CdsHooksControllerTest.java | 15 +- ...CdsServiceRequestJsonDeserializerTest.java | 187 ++++++++++++------ .../svc/CdsServiceRegistryImplTest.java | 7 +- hapi-fhir-server-mdm/pom.xml | 2 +- hapi-fhir-server-openapi/pom.xml | 2 +- hapi-fhir-server/pom.xml | 2 +- .../hapi-fhir-caching-api/pom.xml | 2 +- .../hapi-fhir-caching-caffeine/pom.xml | 4 +- .../hapi-fhir-caching-guava/pom.xml | 2 +- .../hapi-fhir-caching-testing/pom.xml | 2 +- hapi-fhir-serviceloaders/pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../hapi-fhir-spring-boot-samples/pom.xml | 2 +- .../hapi-fhir-spring-boot-starter/pom.xml | 2 +- hapi-fhir-spring-boot/pom.xml | 2 +- hapi-fhir-sql-migrate/pom.xml | 2 +- hapi-fhir-storage-batch2-jobs/pom.xml | 2 +- .../pom.xml | 2 +- hapi-fhir-storage-batch2/pom.xml | 2 +- hapi-fhir-storage-cr/pom.xml | 2 +- hapi-fhir-storage-mdm/pom.xml | 2 +- hapi-fhir-storage-test-utilities/pom.xml | 2 +- hapi-fhir-storage/pom.xml | 2 +- hapi-fhir-structures-dstu2.1/pom.xml | 2 +- hapi-fhir-structures-dstu2/pom.xml | 2 +- hapi-fhir-structures-dstu3/pom.xml | 2 +- hapi-fhir-structures-hl7org-dstu2/pom.xml | 2 +- hapi-fhir-structures-r4/pom.xml | 2 +- hapi-fhir-structures-r4b/pom.xml | 2 +- hapi-fhir-structures-r5/pom.xml | 2 +- hapi-fhir-test-utilities/pom.xml | 2 +- hapi-fhir-testpage-overlay/pom.xml | 2 +- .../pom.xml | 2 +- hapi-fhir-validation-resources-dstu2/pom.xml | 2 +- hapi-fhir-validation-resources-dstu3/pom.xml | 2 +- hapi-fhir-validation-resources-r4/pom.xml | 2 +- hapi-fhir-validation-resources-r4b/pom.xml | 2 +- hapi-fhir-validation-resources-r5/pom.xml | 2 +- hapi-fhir-validation/pom.xml | 2 +- hapi-tinder-plugin/pom.xml | 2 +- hapi-tinder-test/pom.xml | 2 +- pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- .../pom.xml | 2 +- 88 files changed, 305 insertions(+), 214 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6262-fix-cds-hooks-invocation-when-extension-passed-in-request.yaml diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index b6007b191bb..a63d30df6f8 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index 53f3353e6a7..bbb4e7d9acb 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml index 6cec98a4b87..b845c698f1b 100644 --- a/hapi-fhir-base/pom.xml +++ b/hapi-fhir-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-bom/pom.xml b/hapi-fhir-bom/pom.xml index b18421ade9c..22b8724f7e8 100644 --- a/hapi-fhir-bom/pom.xml +++ b/hapi-fhir-bom/pom.xml @@ -4,7 +4,7 @@ 4.0.0 ca.uhn.hapi.fhir hapi-fhir-bom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT pom HAPI FHIR BOM @@ -12,7 +12,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-checkstyle/pom.xml b/hapi-fhir-checkstyle/pom.xml index 34b9a244edc..e3a44edd071 100644 --- a/hapi-fhir-checkstyle/pom.xml +++ b/hapi-fhir-checkstyle/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml index d8ade0aa363..64ba6637ea2 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index 7997bade47d..c6e0de92d36 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-fhir-cli - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 6ad7cc96fd9..25ee977592a 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-client-okhttp/pom.xml b/hapi-fhir-client-okhttp/pom.xml index d1d0a155112..5e6bb12d288 100644 --- a/hapi-fhir-client-okhttp/pom.xml +++ b/hapi-fhir-client-okhttp/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-client/pom.xml b/hapi-fhir-client/pom.xml index c0837508600..53a25a1d95d 100644 --- a/hapi-fhir-client/pom.xml +++ b/hapi-fhir-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-converter/pom.xml b/hapi-fhir-converter/pom.xml index 99cc8732e05..8ee8cee53fa 100644 --- a/hapi-fhir-converter/pom.xml +++ b/hapi-fhir-converter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-dist/pom.xml b/hapi-fhir-dist/pom.xml index f9fdfc45a2c..ed0a4dd5507 100644 --- a/hapi-fhir-dist/pom.xml +++ b/hapi-fhir-dist/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-docs/pom.xml b/hapi-fhir-docs/pom.xml index 7659f76387a..095b30baec8 100644 --- a/hapi-fhir-docs/pom.xml +++ b/hapi-fhir-docs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6262-fix-cds-hooks-invocation-when-extension-passed-in-request.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6262-fix-cds-hooks-invocation-when-extension-passed-in-request.yaml new file mode 100644 index 00000000000..a68ee312359 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6262-fix-cds-hooks-invocation-when-extension-passed-in-request.yaml @@ -0,0 +1,4 @@ +--- +type: fix +issue: 6262 +title: "Previously, when a `extension` was passed in as a part of the CDS hooks request, it would result in a `400 service not found`. This behaviour has now been fixed." diff --git a/hapi-fhir-jacoco/pom.xml b/hapi-fhir-jacoco/pom.xml index a104bf476fb..c15128beca5 100644 --- a/hapi-fhir-jacoco/pom.xml +++ b/hapi-fhir-jacoco/pom.xml @@ -11,7 +11,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jaxrsserver-base/pom.xml b/hapi-fhir-jaxrsserver-base/pom.xml index dd8da0f3742..4346a3fd25d 100644 --- a/hapi-fhir-jaxrsserver-base/pom.xml +++ b/hapi-fhir-jaxrsserver-base/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpa/pom.xml b/hapi-fhir-jpa/pom.xml index 85a9534d7d5..c01367fde30 100644 --- a/hapi-fhir-jpa/pom.xml +++ b/hapi-fhir-jpa/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-base/pom.xml b/hapi-fhir-jpaserver-base/pom.xml index 54888458cbf..4a7722fa96d 100644 --- a/hapi-fhir-jpaserver-base/pom.xml +++ b/hapi-fhir-jpaserver-base/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml index 541c6bcf8e4..63278c80de9 100644 --- a/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-elastic-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-hfql/pom.xml b/hapi-fhir-jpaserver-hfql/pom.xml index c3518186230..b645a59783e 100644 --- a/hapi-fhir-jpaserver-hfql/pom.xml +++ b/hapi-fhir-jpaserver-hfql/pom.xml @@ -3,7 +3,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-ips/pom.xml b/hapi-fhir-jpaserver-ips/pom.xml index c3bb21c52f4..854a185fe21 100644 --- a/hapi-fhir-jpaserver-ips/pom.xml +++ b/hapi-fhir-jpaserver-ips/pom.xml @@ -3,7 +3,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-mdm/pom.xml b/hapi-fhir-jpaserver-mdm/pom.xml index c0b4ddef5d2..33f317dc5d5 100644 --- a/hapi-fhir-jpaserver-mdm/pom.xml +++ b/hapi-fhir-jpaserver-mdm/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-model/pom.xml b/hapi-fhir-jpaserver-model/pom.xml index 9ee46575c6e..3eb70e0326c 100644 --- a/hapi-fhir-jpaserver-model/pom.xml +++ b/hapi-fhir-jpaserver-model/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-searchparam/pom.xml b/hapi-fhir-jpaserver-searchparam/pom.xml index 7c33dcd01cc..1a24fcf3297 100755 --- a/hapi-fhir-jpaserver-searchparam/pom.xml +++ b/hapi-fhir-jpaserver-searchparam/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-subscription/pom.xml b/hapi-fhir-jpaserver-subscription/pom.xml index 4e85901e5e9..ba09eed0ab5 100644 --- a/hapi-fhir-jpaserver-subscription/pom.xml +++ b/hapi-fhir-jpaserver-subscription/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-dstu2/pom.xml b/hapi-fhir-jpaserver-test-dstu2/pom.xml index fe968fe84cb..c3f924fd915 100644 --- a/hapi-fhir-jpaserver-test-dstu2/pom.xml +++ b/hapi-fhir-jpaserver-test-dstu2/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-dstu3/pom.xml b/hapi-fhir-jpaserver-test-dstu3/pom.xml index e8d0f1f6bb4..d665c0f3c97 100644 --- a/hapi-fhir-jpaserver-test-dstu3/pom.xml +++ b/hapi-fhir-jpaserver-test-dstu3/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-r4/pom.xml b/hapi-fhir-jpaserver-test-r4/pom.xml index 548d7257155..86ac609723f 100644 --- a/hapi-fhir-jpaserver-test-r4/pom.xml +++ b/hapi-fhir-jpaserver-test-r4/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-r4b/pom.xml b/hapi-fhir-jpaserver-test-r4b/pom.xml index 37dad0b5380..dec34cddda1 100644 --- a/hapi-fhir-jpaserver-test-r4b/pom.xml +++ b/hapi-fhir-jpaserver-test-r4b/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-r5/pom.xml b/hapi-fhir-jpaserver-test-r5/pom.xml index 9922a18d6d9..32b02b3e1ad 100644 --- a/hapi-fhir-jpaserver-test-r5/pom.xml +++ b/hapi-fhir-jpaserver-test-r5/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-test-utilities/pom.xml b/hapi-fhir-jpaserver-test-utilities/pom.xml index 61c593d03cf..71e63e55591 100644 --- a/hapi-fhir-jpaserver-test-utilities/pom.xml +++ b/hapi-fhir-jpaserver-test-utilities/pom.xml @@ -6,7 +6,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml index 47dd4ef075c..f62519f252c 100644 --- a/hapi-fhir-jpaserver-uhnfhirtest/pom.xml +++ b/hapi-fhir-jpaserver-uhnfhirtest/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-server-cds-hooks/pom.xml b/hapi-fhir-server-cds-hooks/pom.xml index 5f52f9cdf23..1f396dc4fdc 100644 --- a/hapi-fhir-server-cds-hooks/pom.xml +++ b/hapi-fhir-server-cds-hooks/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/ICdsServiceRegistry.java b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/ICdsServiceRegistry.java index e385650dc25..e3002797b60 100644 --- a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/ICdsServiceRegistry.java +++ b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/ICdsServiceRegistry.java @@ -45,7 +45,7 @@ public interface ICdsServiceRegistry { * @param theCdsServiceRequestJson the service request * @return the service response */ - CdsServiceResponseJson callService(String theServiceId, CdsServiceRequestJson theCdsServiceRequestJson); + CdsServiceResponseJson callService(String theServiceId, Object theCdsServiceRequestJson); /** * This is the REST method available at https://example.com/cds-services/{theServiceId}/feedback diff --git a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/json/CdsHooksExtension.java b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/json/CdsHooksExtension.java index adfbf119e5d..f4d41bc2189 100644 --- a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/json/CdsHooksExtension.java +++ b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/json/CdsHooksExtension.java @@ -20,9 +20,11 @@ package ca.uhn.hapi.fhir.cdshooks.api.json; import ca.uhn.fhir.model.api.IModelJson; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * Users can define CDS Hooks extensions by extending this class. * Implementors can extend this class for defining their custom extensions. */ +@JsonIgnoreProperties(ignoreUnknown = true) public class CdsHooksExtension implements IModelJson {} diff --git a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/json/CdsServiceRequestContextJson.java b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/json/CdsServiceRequestContextJson.java index de2988594c7..9fb8649e5ee 100644 --- a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/json/CdsServiceRequestContextJson.java +++ b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/api/json/CdsServiceRequestContextJson.java @@ -21,6 +21,7 @@ package ca.uhn.hapi.fhir.cdshooks.api.json; import ca.uhn.fhir.model.api.IModelJson; import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.hl7.fhir.instance.model.api.IBaseResource; import java.util.Collections; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +@JsonIgnoreProperties(ignoreUnknown = true) public class CdsServiceRequestContextJson extends BaseCdsServiceJson implements IModelJson { @JsonAnyGetter diff --git a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/config/CdsHooksConfig.java b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/config/CdsHooksConfig.java index 37efd73711c..34f9b2258ab 100644 --- a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/config/CdsHooksConfig.java +++ b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/config/CdsHooksConfig.java @@ -31,6 +31,7 @@ import ca.uhn.hapi.fhir.cdshooks.api.ICdsConfigService; import ca.uhn.hapi.fhir.cdshooks.api.ICdsHooksDaoAuthorizationSvc; import ca.uhn.hapi.fhir.cdshooks.api.ICdsServiceRegistry; import ca.uhn.hapi.fhir.cdshooks.module.CdsHooksObjectMapperFactory; +import ca.uhn.hapi.fhir.cdshooks.serializer.CdsServiceRequestJsonDeserializer; import ca.uhn.hapi.fhir.cdshooks.svc.CdsConfigServiceImpl; import ca.uhn.hapi.fhir.cdshooks.svc.CdsHooksContextBooter; import ca.uhn.hapi.fhir.cdshooks.svc.CdsServiceRegistryImpl; @@ -100,13 +101,15 @@ public class CdsHooksConfig { ICdsCrServiceFactory theCdsCrServiceFactory, ICrDiscoveryServiceFactory theCrDiscoveryServiceFactory, FhirContext theFhirContext) { + final CdsServiceRequestJsonDeserializer cdsServiceRequestJsonDeserializer = + new CdsServiceRequestJsonDeserializer(theFhirContext, theObjectMapper); return new CdsServiceRegistryImpl( theCdsHooksContextBooter, theCdsPrefetchSvc, theObjectMapper, theCdsCrServiceFactory, theCrDiscoveryServiceFactory, - theFhirContext); + cdsServiceRequestJsonDeserializer); } @Bean diff --git a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/controller/CdsHooksController.java b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/controller/CdsHooksController.java index 10896e2f74a..0ae202abec4 100644 --- a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/controller/CdsHooksController.java +++ b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/controller/CdsHooksController.java @@ -21,7 +21,6 @@ package ca.uhn.hapi.fhir.cdshooks.controller; import ca.uhn.hapi.fhir.cdshooks.api.ICdsServiceRegistry; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceFeedbackJson; -import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceResponseJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServicesJson; import org.springframework.http.HttpStatus; @@ -73,7 +72,7 @@ public class CdsHooksController { method = {RequestMethod.POST}, consumes = {MediaType.APPLICATION_JSON_VALUE}) public ResponseEntity cdsServiceRequest( - @PathVariable("cds_hook") String theCdsHook, @RequestBody CdsServiceRequestJson theCdsServiceRequestJson) { + @PathVariable("cds_hook") String theCdsHook, @RequestBody Object theCdsServiceRequestJson) { CdsServiceResponseJson response = myCdsServiceRegistry.callService(theCdsHook, theCdsServiceRequestJson); return ResponseEntity.status(200) .contentType(MediaType.APPLICATION_JSON) diff --git a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/serializer/CdsServiceRequestJsonDeserializer.java b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/serializer/CdsServiceRequestJsonDeserializer.java index 6019a3d114c..d64ff9c3964 100644 --- a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/serializer/CdsServiceRequestJsonDeserializer.java +++ b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/serializer/CdsServiceRequestJsonDeserializer.java @@ -20,84 +20,60 @@ package ca.uhn.hapi.fhir.cdshooks.serializer; import ca.uhn.fhir.context.FhirContext; +import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.parser.IParser; -import ca.uhn.fhir.serializer.FhirResourceDeserializer; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsHooksExtension; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestContextJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestJson; -import ca.uhn.hapi.fhir.cdshooks.svc.CdsServiceRegistryImpl; -import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.deser.std.StdDeserializer; -import com.fasterxml.jackson.databind.module.SimpleModule; +import jakarta.annotation.Nonnull; import org.hl7.fhir.instance.model.api.IBaseResource; -import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; -public class CdsServiceRequestJsonDeserializer extends StdDeserializer { - - private final CdsServiceRegistryImpl myCdsServiceRegistry; +public class CdsServiceRequestJsonDeserializer { private final ObjectMapper myObjectMapper; private final FhirContext myFhirContext; private final IParser myParser; - public CdsServiceRequestJsonDeserializer(CdsServiceRegistryImpl theCdsServiceRegistry, FhirContext theFhirContext) { - super(CdsServiceRequestJson.class); - myCdsServiceRegistry = theCdsServiceRegistry; + public CdsServiceRequestJsonDeserializer( + @Nonnull FhirContext theFhirContext, @Nonnull ObjectMapper theObjectMapper) { myFhirContext = theFhirContext; myParser = myFhirContext.newJsonParser().setPrettyPrint(true); - // We create a new ObjectMapper instead of using the one from the ApplicationContext to avoid an infinite loop - // during deserialization. - myObjectMapper = new ObjectMapper(); - configureObjectMapper(myObjectMapper); + myObjectMapper = theObjectMapper; } - @Override - public CdsServiceRequestJson deserialize(JsonParser theJsonParser, DeserializationContext theDeserializationContext) - throws IOException { - final JsonNode cdsServiceRequestJsonNode = theJsonParser.getCodec().readTree(theJsonParser); - final JsonNode hookNode = cdsServiceRequestJsonNode.get("hook"); - final JsonNode extensionNode = cdsServiceRequestJsonNode.get("extension"); - final JsonNode requestContext = cdsServiceRequestJsonNode.get("context"); - final CdsServiceRequestJson cdsServiceRequestJson = - myObjectMapper.treeToValue(cdsServiceRequestJsonNode, CdsServiceRequestJson.class); - if (extensionNode != null) { - CdsHooksExtension myRequestExtension = deserializeExtension(hookNode.textValue(), extensionNode.toString()); - cdsServiceRequestJson.setExtension(myRequestExtension); + public CdsServiceRequestJson deserialize( + @Nonnull CdsServiceJson theCdsServiceJson, @Nonnull Object theCdsServiceRequestJson) { + final JsonNode cdsServiceRequestJsonNode = + myObjectMapper.convertValue(theCdsServiceRequestJson, JsonNode.class); + final JsonNode contextNode = cdsServiceRequestJsonNode.get("context"); + validateHookInstance(cdsServiceRequestJsonNode.get("hookInstance")); + validateHook(cdsServiceRequestJsonNode.get("hook")); + validateContext(contextNode); + try { + final JsonNode extensionNode = cdsServiceRequestJsonNode.get("extension"); + final CdsServiceRequestJson cdsServiceRequestJson = + myObjectMapper.convertValue(cdsServiceRequestJsonNode, CdsServiceRequestJson.class); + LinkedHashMap map = myObjectMapper.readValue(contextNode.toString(), LinkedHashMap.class); + cdsServiceRequestJson.setContext(deserializeContext(map)); + if (extensionNode != null) { + CdsHooksExtension myRequestExtension = + deserializeExtension(theCdsServiceJson, extensionNode.toString()); + cdsServiceRequestJson.setExtension(myRequestExtension); + } + return cdsServiceRequestJson; + } catch (JsonProcessingException | IllegalArgumentException theEx) { + throw new InvalidRequestException(Msg.code(2551) + "Invalid CdsServiceRequest received. " + theEx); } - if (requestContext != null) { - LinkedHashMap map = - myObjectMapper.readValue(requestContext.toString(), LinkedHashMap.class); - cdsServiceRequestJson.setContext(deserializeRequestContext(map)); - } - return cdsServiceRequestJson; } - void configureObjectMapper(ObjectMapper theObjectMapper) { - SimpleModule module = new SimpleModule(); - module.addDeserializer(IBaseResource.class, new FhirResourceDeserializer(myFhirContext)); - theObjectMapper.registerModule(module); - // set this as we will need to ignore properties which are not defined by specific implementation. - theObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); - } - - CdsHooksExtension deserializeExtension(String theServiceId, String theExtension) throws JsonProcessingException { - final CdsServiceJson cdsServicesJson = myCdsServiceRegistry.getCdsServiceJson(theServiceId); - Class extensionClass = cdsServicesJson.getExtensionClass(); - if (extensionClass == null) { - return null; - } - return myObjectMapper.readValue(theExtension, extensionClass); - } - - CdsServiceRequestContextJson deserializeRequestContext(LinkedHashMap theMap) + CdsServiceRequestContextJson deserializeContext(LinkedHashMap theMap) throws JsonProcessingException { final CdsServiceRequestContextJson cdsServiceRequestContextJson = new CdsServiceRequestContextJson(); for (Map.Entry entry : theMap.entrySet()) { @@ -114,4 +90,31 @@ public class CdsServiceRequestJsonDeserializer extends StdDeserializer extensionClass = theCdsServiceJson.getExtensionClass(); + if (extensionClass == null) { + return null; + } + return myObjectMapper.readValue(theExtension, extensionClass); + } + + private void validateHook(JsonNode hookIdNode) { + if (hookIdNode == null) { + throw new InvalidRequestException(Msg.code(2549) + "hook cannot be null for a CdsServiceRequest."); + } + } + + private void validateHookInstance(JsonNode hookInstanceNode) { + if (hookInstanceNode == null) { + throw new InvalidRequestException(Msg.code(2548) + "hookInstance cannot be null for a CdsServiceRequest."); + } + } + + private void validateContext(JsonNode requestContextNode) { + if (requestContextNode == null) { + throw new InvalidRequestException(Msg.code(2550) + "context cannot be null for a CdsServiceRequest."); + } + } } diff --git a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceRegistryImpl.java b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceRegistryImpl.java index 720fca731d7..8613dee9554 100644 --- a/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceRegistryImpl.java +++ b/hapi-fhir-server-cds-hooks/src/main/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceRegistryImpl.java @@ -20,7 +20,6 @@ package ca.uhn.hapi.fhir.cdshooks.svc; import ca.uhn.fhir.context.ConfigurationException; -import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.i18n.Msg; import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException; import ca.uhn.hapi.fhir.cdshooks.api.ICdsMethod; @@ -38,7 +37,6 @@ import ca.uhn.hapi.fhir.cdshooks.svc.cr.discovery.ICrDiscoveryServiceFactory; import ca.uhn.hapi.fhir.cdshooks.svc.prefetch.CdsPrefetchSvc; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.module.SimpleModule; import com.google.common.annotations.VisibleForTesting; import jakarta.annotation.Nonnull; import jakarta.annotation.PostConstruct; @@ -50,7 +48,7 @@ import java.util.function.Function; public class CdsServiceRegistryImpl implements ICdsServiceRegistry { private static final Logger ourLog = LoggerFactory.getLogger(CdsServiceRegistryImpl.class); - + private final CdsServiceRequestJsonDeserializer myCdsServiceRequestJsonDeserializer; private CdsServiceCache myServiceCache; private final CdsHooksContextBooter myCdsHooksContextBooter; @@ -65,19 +63,13 @@ public class CdsServiceRegistryImpl implements ICdsServiceRegistry { ObjectMapper theObjectMapper, ICdsCrServiceFactory theCdsCrServiceFactory, ICrDiscoveryServiceFactory theCrDiscoveryServiceFactory, - FhirContext theFhirContext) { + CdsServiceRequestJsonDeserializer theCdsServiceRequestJsonDeserializer) { myCdsHooksContextBooter = theCdsHooksContextBooter; myCdsPrefetchSvc = theCdsPrefetchSvc; myObjectMapper = theObjectMapper; - // registering this deserializer here instead of - // CdsHooksObjectMapperFactory to avoid circular - // dependency - SimpleModule module = new SimpleModule(); - module.addDeserializer( - CdsServiceRequestJson.class, new CdsServiceRequestJsonDeserializer(this, theFhirContext)); - myObjectMapper.registerModule(module); myCdsCrServiceFactory = theCdsCrServiceFactory; myCrDiscoveryServiceFactory = theCrDiscoveryServiceFactory; + myCdsServiceRequestJsonDeserializer = theCdsServiceRequestJsonDeserializer; } @PostConstruct @@ -91,10 +83,13 @@ public class CdsServiceRegistryImpl implements ICdsServiceRegistry { } @Override - public CdsServiceResponseJson callService(String theServiceId, CdsServiceRequestJson theCdsServiceRequestJson) { + public CdsServiceResponseJson callService(String theServiceId, Object theCdsServiceRequestJson) { + final CdsServiceJson cdsServiceJson = getCdsServiceJson(theServiceId); + final CdsServiceRequestJson deserializedRequest = + myCdsServiceRequestJsonDeserializer.deserialize(cdsServiceJson, theCdsServiceRequestJson); ICdsServiceMethod serviceMethod = (ICdsServiceMethod) getCdsServiceMethodOrThrowException(theServiceId); - myCdsPrefetchSvc.augmentRequest(theCdsServiceRequestJson, serviceMethod); - Object response = serviceMethod.invoke(myObjectMapper, theCdsServiceRequestJson, theServiceId); + myCdsPrefetchSvc.augmentRequest(deserializedRequest, serviceMethod); + Object response = serviceMethod.invoke(myObjectMapper, deserializedRequest, theServiceId); return encodeServiceResponse(theServiceId, response); } diff --git a/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/controller/CdsHooksControllerTest.java b/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/controller/CdsHooksControllerTest.java index e6067fc16f4..22065764b41 100644 --- a/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/controller/CdsHooksControllerTest.java +++ b/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/controller/CdsHooksControllerTest.java @@ -5,6 +5,7 @@ import ca.uhn.hapi.fhir.cdshooks.api.ICdsServiceRegistry; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceFeebackOutcomeEnum; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceFeedbackJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceJson; +import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestContextJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceResponseCardJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceResponseJson; @@ -118,6 +119,7 @@ public class CdsHooksControllerTest { request.setHookInstance(TEST_HOOK_INSTANCE); request.setHook(HelloWorldService.TEST_HOOK); request.setFhirServer(TEST_FHIR_SERVER); + request.setContext( withCdsServiceRequestContext()); String requestBody = myObjectMapper.writeValueAsString(request); @@ -142,8 +144,9 @@ public class CdsHooksControllerTest { CdsServiceRequestJson request = new CdsServiceRequestJson(); request.setExtension(requestExtension); request.setFhirServer(TEST_FHIR_SERVER); - request.setHook(HelloWorldService.TEST_HOOK_UNIVERSE_ID); - + request.setHook(HelloWorldService.TEST_HOOK); + request.setContext(withCdsServiceRequestContext()); + request.setHookInstance(UUID.randomUUID().toString()); String requestBody = myObjectMapper.writeValueAsString(request); @@ -163,6 +166,7 @@ public class CdsHooksControllerTest { request.setHookInstance(TEST_HOOK_INSTANCE); request.setHook(HelloWorldService.TEST_HOOK); request.setFhirServer(TEST_FHIR_SERVER); + request.setContext(withCdsServiceRequestContext()); String requestBody = myObjectMapper.writeValueAsString(request); @@ -268,4 +272,11 @@ public class CdsHooksControllerTest { return JsonUtil.serialize(input, true); } + @Nonnull + private static CdsServiceRequestContextJson withCdsServiceRequestContext() { + CdsServiceRequestContextJson cdsServiceRequestContextJson = new CdsServiceRequestContextJson(); + cdsServiceRequestContextJson.put("patientId", "Patient/123"); + return cdsServiceRequestContextJson; + } + } diff --git a/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/serializer/CdsServiceRequestJsonDeserializerTest.java b/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/serializer/CdsServiceRequestJsonDeserializerTest.java index 0e1e659cc8a..ecd8176ce6a 100644 --- a/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/serializer/CdsServiceRequestJsonDeserializerTest.java +++ b/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/serializer/CdsServiceRequestJsonDeserializerTest.java @@ -1,106 +1,152 @@ package ca.uhn.hapi.fhir.cdshooks.serializer; import ca.uhn.fhir.context.FhirContext; -import ca.uhn.hapi.fhir.cdshooks.api.json.CdsHooksExtension; +import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestContextJson; +import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceRequestJson; import ca.uhn.hapi.fhir.cdshooks.custom.extensions.model.ExampleExtension; -import ca.uhn.hapi.fhir.cdshooks.svc.CdsServiceRegistryImpl; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.annotation.Nonnull; import org.hl7.fhir.r4.model.Patient; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mock; -import org.mockito.junit.jupiter.MockitoExtension; import java.util.LinkedHashMap; +import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.Mockito.doReturn; +import static org.assertj.core.api.Assertions.assertThatThrownBy; -@ExtendWith(MockitoExtension.class) class CdsServiceRequestJsonDeserializerTest { - @Mock - private CdsServiceRegistryImpl myCdsServiceRegistry; + private static final String SERVICE_ID = "service-id"; + private static final String EXAMPLE_PROPERTY_VALUE = "example-value"; + private static final String EXAMPLE_PROPERTY_KEY = "example-property"; + private static final String HOOK_ID = "hook-id"; private final FhirContext myFhirContext = FhirContext.forR4(); + private final ObjectMapper myObjectMapper = new ObjectMapper(); private CdsServiceRequestJsonDeserializer myFixture; @BeforeEach() void setup() { - myFixture = new CdsServiceRequestJsonDeserializer(myCdsServiceRegistry, myFhirContext); + myFixture = new CdsServiceRequestJsonDeserializer(myFhirContext, myObjectMapper); } @Test - void configureObjectMapper() { + void deserialize_shouldDeserialize_whenValidCdsServiceRequestWithExtensionReceived() { // setup - ObjectMapper input = new ObjectMapper(); + final CdsServiceJson cdsServiceJson = withCdsServiceJsonIncludingExtensionClass(); + final LinkedHashMap extension = withExtension(); + final LinkedHashMap request = withRequest(extension); + request.put("context", withContext()); // execute - myFixture.configureObjectMapper(input); + final CdsServiceRequestJson actual = myFixture.deserialize(cdsServiceJson, request); // validate - assertThat(input.getRegisteredModuleIds()).hasSize(1); + assertThat(actual.getExtension()).isInstanceOf(ExampleExtension.class); + final ExampleExtension actualExtension = (ExampleExtension) actual.getExtension(); + assertThat(actualExtension.getExampleProperty()).isEqualTo(EXAMPLE_PROPERTY_VALUE); } @Test - void deserializeExtensionWhenClassFoundShouldDeserializeExtension() throws JsonProcessingException { + void deserialize_shouldIgnoreExtraFieldsInsideExtension_whenExtensionContainsMoreFieldsThanDefinedInClass() { + // setup + final CdsServiceJson cdsServiceJson = withCdsServiceJsonIncludingExtensionClass(); + final LinkedHashMap extension = withExtension(); + extension.put("example-extra-property", "example-extra-value"); + final LinkedHashMap request = withRequest(extension); + request.put("context", withContext()); + // execute + final CdsServiceRequestJson actual = myFixture.deserialize(cdsServiceJson, request); + // validate + assertThat(actual.getExtension()).isInstanceOf(ExampleExtension.class); + final ExampleExtension actualExtension = (ExampleExtension) actual.getExtension(); + assertThat(actualExtension.getExampleProperty()).isEqualTo(EXAMPLE_PROPERTY_VALUE); + assertThat(actual.getContext().get("encounterId")).isEqualTo("Encounter/123"); + } + + @Nonnull + private static LinkedHashMap withContext() { + final LinkedHashMap context = new LinkedHashMap<>(); + context.put("encounterId", "Encounter/123"); + return context; + } + + @Test + void deserialize_shouldThrow_whenCdsServiceRequestIncludesInvalidProperty() { + // setup + final CdsServiceJson cdsServiceJson = withCdsServiceJsonIncludingExtensionClass(); + final LinkedHashMap extension = withExtension(); + final LinkedHashMap request = withRequest(extension); + request.put("invalid-key", "some-value"); + request.put("context", withContext()); + // execute & validate + assertThatThrownBy( + () -> myFixture.deserialize(cdsServiceJson, request)) + .isInstanceOf(InvalidRequestException.class) + .hasMessageContaining("HAPI-2551:") + .hasMessageContaining("Invalid CdsServiceRequest received."); + } + + @Test + void deserialize_shouldReturnNullExtension_whenNotClassFound() { // setup - final String serviceId = "service-id"; - final String extension = """ - { - "example-property": "example-value" - } - """; final CdsServiceJson cdsServiceJson = new CdsServiceJson(); - cdsServiceJson.setId(serviceId); - cdsServiceJson.setExtensionClass(ExampleExtension.class); - doReturn(cdsServiceJson).when(myCdsServiceRegistry).getCdsServiceJson(serviceId); + cdsServiceJson.setId(SERVICE_ID); + final LinkedHashMap extension = withExtension(); + extension.put("example-extra-property", "example-extra-value"); + final LinkedHashMap request = withRequest(extension); + request.put("context", withContext()); // execute - final ExampleExtension actual = (ExampleExtension) myFixture.deserializeExtension(serviceId, extension); + final CdsServiceRequestJson actual = myFixture.deserialize(cdsServiceJson, request); // validate - assertThat(actual.getExampleProperty()).isEqualTo("example-value"); + assertThat(actual.getExtension()).isNull(); } @Test - void deserializeExtensionWhenClassFoundButExtensionHasExtraPropertiesShouldIgnoreExtraProperties() throws JsonProcessingException { + void deserialize_shouldThrow_whenHookNotFoundInRequest() { // setup - final String serviceId = "service-id"; - final String extension = """ - { - "example-property": "example-value", - "example-extra-property": "example-extra-value" - } - """; - final CdsServiceJson cdsServiceJson = new CdsServiceJson(); - cdsServiceJson.setId(serviceId); - cdsServiceJson.setExtensionClass(ExampleExtension.class); - doReturn(cdsServiceJson).when(myCdsServiceRegistry).getCdsServiceJson(serviceId); - // execute - final ExampleExtension actual = (ExampleExtension) myFixture.deserializeExtension(serviceId, extension); - // validate - assertThat(actual.getExampleProperty()).isEqualTo("example-value"); + final CdsServiceJson cdsServiceJson = withCdsServiceJsonIncludingExtensionClass(); + final LinkedHashMap request = new LinkedHashMap<>(); + request.put("context", withContext()); + request.put("hookInstance", UUID.randomUUID().toString()); + // execute and validate + assertThatThrownBy(() -> myFixture.deserialize(cdsServiceJson, request)) + .isInstanceOf(InvalidRequestException.class) + .hasMessageContaining("HAPI-2549:") + .hasMessageContaining("hook cannot be null for a CdsServiceRequest."); } @Test - void deserializeExtensionWhenNotClassFoundShouldReturnNull() throws JsonProcessingException { + void deserialize_shouldThrow_whenContextNotFoundInRequest() { // setup - final String serviceId = "service-id"; - final String extension = """ - { - "example-property": "example-value" - } - """; - final CdsServiceJson cdsServiceJson = new CdsServiceJson(); - cdsServiceJson.setId(serviceId); - doReturn(cdsServiceJson).when(myCdsServiceRegistry).getCdsServiceJson(serviceId); - // execute - final CdsHooksExtension actual = myFixture.deserializeExtension(serviceId, extension); - // validate - assertThat(actual).isNull(); + final CdsServiceJson cdsServiceJson = withCdsServiceJsonIncludingExtensionClass(); + final LinkedHashMap request = new LinkedHashMap<>(); + request.put("hook", HOOK_ID); + request.put("hookInstance", UUID.randomUUID().toString()); + // execute and validate + assertThatThrownBy(() -> myFixture.deserialize(cdsServiceJson, request)) + .isInstanceOf(InvalidRequestException.class) + .hasMessageContaining("HAPI-2550:") + .hasMessageContaining("context cannot be null for a CdsServiceRequest."); } @Test - void deserializeRequestContextShouldDeserializeValidContext() throws JsonProcessingException { + void deserialize_shouldThrow_whenHookInstanceNotFoundInRequest() { + // setup + final CdsServiceJson cdsServiceJson = withCdsServiceJsonIncludingExtensionClass(); + final LinkedHashMap request = new LinkedHashMap<>(); + request.put("context", withContext()); + request.put("hook", HOOK_ID); + // execute and validate + assertThatThrownBy(() -> myFixture.deserialize(cdsServiceJson, request)) + .isInstanceOf(InvalidRequestException.class) + .hasMessageContaining("HAPI-2548:") + .hasMessageContaining("hookInstance cannot be null for a CdsServiceRequest."); + } + + @Test + void deserializeRequestContext_shouldDeserialize_whenContextIsValid() throws JsonProcessingException { // setup final String encounterId = "123"; final Patient patientContext = new Patient(); @@ -109,9 +155,34 @@ class CdsServiceRequestJsonDeserializerTest { input.put("encounterId", encounterId); input.put("patient", patientContext); // execute - final CdsServiceRequestContextJson actual = myFixture.deserializeRequestContext(input); + final CdsServiceRequestContextJson actual = myFixture.deserializeContext(input); // validate assertThat(actual.get("encounterId")).isEqualTo(encounterId); assertThat(actual.get("patient")).usingRecursiveComparison().isEqualTo(patientContext); } + + @Nonnull + private static LinkedHashMap withExtension() { + final LinkedHashMap extension = new LinkedHashMap<>(); + extension.put(EXAMPLE_PROPERTY_KEY, EXAMPLE_PROPERTY_VALUE); + return extension; + } + + @Nonnull + private static CdsServiceJson withCdsServiceJsonIncludingExtensionClass() { + final CdsServiceJson cdsServiceJson = new CdsServiceJson(); + cdsServiceJson.setId(SERVICE_ID); + cdsServiceJson.setExtensionClass(ExampleExtension.class); + cdsServiceJson.setHook(HOOK_ID); + return cdsServiceJson; + } + + @Nonnull + private static LinkedHashMap withRequest(@Nonnull LinkedHashMap theExtension) { + final LinkedHashMap request = new LinkedHashMap<>(); + request.put("extension", theExtension); + request.put("hookInstance", UUID.randomUUID().toString()); + request.put("hook", HOOK_ID); + return request; + } } diff --git a/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceRegistryImplTest.java b/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceRegistryImplTest.java index 4bb7f699331..3ba49b9f5f6 100644 --- a/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceRegistryImplTest.java +++ b/hapi-fhir-server-cds-hooks/src/test/java/ca/uhn/hapi/fhir/cdshooks/svc/CdsServiceRegistryImplTest.java @@ -1,10 +1,10 @@ package ca.uhn.hapi.fhir.cdshooks.svc; import ca.uhn.fhir.context.ConfigurationException; -import ca.uhn.fhir.context.FhirContext; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceFeedbackJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceJson; import ca.uhn.hapi.fhir.cdshooks.api.json.CdsServiceResponseJson; +import ca.uhn.hapi.fhir.cdshooks.serializer.CdsServiceRequestJsonDeserializer; import ca.uhn.hapi.fhir.cdshooks.svc.cr.ICdsCrServiceFactory; import ca.uhn.hapi.fhir.cdshooks.svc.cr.discovery.ICrDiscoveryServiceFactory; import ca.uhn.hapi.fhir.cdshooks.svc.prefetch.CdsPrefetchSvc; @@ -33,13 +33,14 @@ class CdsServiceRegistryImplTest { private ICrDiscoveryServiceFactory myCrDiscoveryServiceFactory; @Mock private CdsServiceCache myCdsServiceCache; + @Mock + private CdsServiceRequestJsonDeserializer myCdsServiceRequestJsonDeserializer; private final ObjectMapper myObjectMapper = new ObjectMapper(); - private final FhirContext myFhirContext = FhirContext.forR4(); private CdsServiceRegistryImpl myFixture; @BeforeEach() void setup() { - myFixture = new CdsServiceRegistryImpl(myCdsHooksContextBooter, myCdsPrefetchSvc, myObjectMapper, myCdsCrServiceFactory, myCrDiscoveryServiceFactory, myFhirContext); + myFixture = new CdsServiceRegistryImpl(myCdsHooksContextBooter, myCdsPrefetchSvc, myObjectMapper, myCdsCrServiceFactory, myCrDiscoveryServiceFactory, myCdsServiceRequestJsonDeserializer); } @Test diff --git a/hapi-fhir-server-mdm/pom.xml b/hapi-fhir-server-mdm/pom.xml index 5e2b9ee3e05..95abe58fe85 100644 --- a/hapi-fhir-server-mdm/pom.xml +++ b/hapi-fhir-server-mdm/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server-openapi/pom.xml b/hapi-fhir-server-openapi/pom.xml index 8850b3445eb..89e2600dd02 100644 --- a/hapi-fhir-server-openapi/pom.xml +++ b/hapi-fhir-server-openapi/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-server/pom.xml b/hapi-fhir-server/pom.xml index 457cd28044c..be0015008a1 100644 --- a/hapi-fhir-server/pom.xml +++ b/hapi-fhir-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml index cee8e510785..39836ddc8e4 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-api/pom.xml @@ -7,7 +7,7 @@ hapi-fhir-serviceloaders ca.uhn.hapi.fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml index 428f89dc3d4..e8eae8ff086 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-caffeine/pom.xml @@ -7,7 +7,7 @@ hapi-fhir-serviceloaders ca.uhn.hapi.fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml @@ -21,7 +21,7 @@ ca.uhn.hapi.fhir hapi-fhir-caching-api - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml index 8dc3778e4ab..89e57090090 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-guava/pom.xml @@ -7,7 +7,7 @@ hapi-fhir-serviceloaders ca.uhn.hapi.fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml index f3a6f30fdc7..1d43c70ed0e 100644 --- a/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml +++ b/hapi-fhir-serviceloaders/hapi-fhir-caching-testing/pom.xml @@ -7,7 +7,7 @@ hapi-fhir ca.uhn.hapi.fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../../pom.xml diff --git a/hapi-fhir-serviceloaders/pom.xml b/hapi-fhir-serviceloaders/pom.xml index dc407e19ef3..13859f26fee 100644 --- a/hapi-fhir-serviceloaders/pom.xml +++ b/hapi-fhir-serviceloaders/pom.xml @@ -5,7 +5,7 @@ hapi-deployable-pom ca.uhn.hapi.fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml index 58fdac09a26..7301924dde5 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-autoconfigure/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml index 7a634812925..137bd075790 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-apache/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT hapi-fhir-spring-boot-sample-client-apache diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml index 7fd06fcf3bf..106a0cf80bf 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-client-okhttp/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml index 1f735d48418..0c2e4ed2f08 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/hapi-fhir-spring-boot-sample-server-jersey/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot-samples - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml index 62f9c031867..6c62b628f06 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-samples/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir-spring-boot - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT diff --git a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml index b65824baf92..52a41c7dc64 100644 --- a/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml +++ b/hapi-fhir-spring-boot/hapi-fhir-spring-boot-starter/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-spring-boot/pom.xml b/hapi-fhir-spring-boot/pom.xml index d7c752647e1..4877a32ed4f 100644 --- a/hapi-fhir-spring-boot/pom.xml +++ b/hapi-fhir-spring-boot/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-sql-migrate/pom.xml b/hapi-fhir-sql-migrate/pom.xml index 429c1914686..08f9decc2d8 100644 --- a/hapi-fhir-sql-migrate/pom.xml +++ b/hapi-fhir-sql-migrate/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-batch2-jobs/pom.xml b/hapi-fhir-storage-batch2-jobs/pom.xml index 6ad5389cf0f..bcab73f8584 100644 --- a/hapi-fhir-storage-batch2-jobs/pom.xml +++ b/hapi-fhir-storage-batch2-jobs/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-batch2-test-utilities/pom.xml b/hapi-fhir-storage-batch2-test-utilities/pom.xml index c5433cf41b0..e695c5bed3f 100644 --- a/hapi-fhir-storage-batch2-test-utilities/pom.xml +++ b/hapi-fhir-storage-batch2-test-utilities/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-batch2/pom.xml b/hapi-fhir-storage-batch2/pom.xml index 28434f97f04..682fa7b8e69 100644 --- a/hapi-fhir-storage-batch2/pom.xml +++ b/hapi-fhir-storage-batch2/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-cr/pom.xml b/hapi-fhir-storage-cr/pom.xml index 3cc3d4e2d6c..8d77500f0de 100644 --- a/hapi-fhir-storage-cr/pom.xml +++ b/hapi-fhir-storage-cr/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-mdm/pom.xml b/hapi-fhir-storage-mdm/pom.xml index 6075061dc6a..7f6779287ec 100644 --- a/hapi-fhir-storage-mdm/pom.xml +++ b/hapi-fhir-storage-mdm/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage-test-utilities/pom.xml b/hapi-fhir-storage-test-utilities/pom.xml index db16c567f49..2496ea7f0ba 100644 --- a/hapi-fhir-storage-test-utilities/pom.xml +++ b/hapi-fhir-storage-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-storage/pom.xml b/hapi-fhir-storage/pom.xml index b20baf0c3d7..dbf8d1ced1d 100644 --- a/hapi-fhir-storage/pom.xml +++ b/hapi-fhir-storage/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2.1/pom.xml b/hapi-fhir-structures-dstu2.1/pom.xml index ad65f33ad54..9b0b6862b32 100644 --- a/hapi-fhir-structures-dstu2.1/pom.xml +++ b/hapi-fhir-structures-dstu2.1/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu2/pom.xml b/hapi-fhir-structures-dstu2/pom.xml index 891eb98b319..718c23b5326 100644 --- a/hapi-fhir-structures-dstu2/pom.xml +++ b/hapi-fhir-structures-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-dstu3/pom.xml b/hapi-fhir-structures-dstu3/pom.xml index cf3ae30aba5..99473d8ea42 100644 --- a/hapi-fhir-structures-dstu3/pom.xml +++ b/hapi-fhir-structures-dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-hl7org-dstu2/pom.xml b/hapi-fhir-structures-hl7org-dstu2/pom.xml index dc22111adef..c93237fa349 100644 --- a/hapi-fhir-structures-hl7org-dstu2/pom.xml +++ b/hapi-fhir-structures-hl7org-dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4/pom.xml b/hapi-fhir-structures-r4/pom.xml index 612e2dcfb14..fa613174e8a 100644 --- a/hapi-fhir-structures-r4/pom.xml +++ b/hapi-fhir-structures-r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r4b/pom.xml b/hapi-fhir-structures-r4b/pom.xml index a810259a2c7..4eb3c7bd63b 100644 --- a/hapi-fhir-structures-r4b/pom.xml +++ b/hapi-fhir-structures-r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-structures-r5/pom.xml b/hapi-fhir-structures-r5/pom.xml index a3c7f077788..10380569b8a 100644 --- a/hapi-fhir-structures-r5/pom.xml +++ b/hapi-fhir-structures-r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-test-utilities/pom.xml b/hapi-fhir-test-utilities/pom.xml index 23ef56c067d..f29a7f80edc 100644 --- a/hapi-fhir-test-utilities/pom.xml +++ b/hapi-fhir-test-utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml index 86cb5491962..fca8cd4ec66 100644 --- a/hapi-fhir-testpage-overlay/pom.xml +++ b/hapi-fhir-testpage-overlay/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-fhir-validation-resources-dstu2.1/pom.xml b/hapi-fhir-validation-resources-dstu2.1/pom.xml index 39a50f70244..2e4c696ee12 100644 --- a/hapi-fhir-validation-resources-dstu2.1/pom.xml +++ b/hapi-fhir-validation-resources-dstu2.1/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu2/pom.xml b/hapi-fhir-validation-resources-dstu2/pom.xml index 1cd6e7487ec..138e7289d27 100644 --- a/hapi-fhir-validation-resources-dstu2/pom.xml +++ b/hapi-fhir-validation-resources-dstu2/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-dstu3/pom.xml b/hapi-fhir-validation-resources-dstu3/pom.xml index f50bea30960..e0004b8c837 100644 --- a/hapi-fhir-validation-resources-dstu3/pom.xml +++ b/hapi-fhir-validation-resources-dstu3/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4/pom.xml b/hapi-fhir-validation-resources-r4/pom.xml index f0c88093297..c6ab551404a 100644 --- a/hapi-fhir-validation-resources-r4/pom.xml +++ b/hapi-fhir-validation-resources-r4/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r4b/pom.xml b/hapi-fhir-validation-resources-r4b/pom.xml index 75b31d7a730..325d05648e8 100644 --- a/hapi-fhir-validation-resources-r4b/pom.xml +++ b/hapi-fhir-validation-resources-r4b/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation-resources-r5/pom.xml b/hapi-fhir-validation-resources-r5/pom.xml index 97ca30bf0c8..b853d0cc3ab 100644 --- a/hapi-fhir-validation-resources-r5/pom.xml +++ b/hapi-fhir-validation-resources-r5/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-fhir-validation/pom.xml b/hapi-fhir-validation/pom.xml index 64edc13bbe8..49d73daa1e0 100644 --- a/hapi-fhir-validation/pom.xml +++ b/hapi-fhir-validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-deployable-pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../hapi-deployable-pom/pom.xml diff --git a/hapi-tinder-plugin/pom.xml b/hapi-tinder-plugin/pom.xml index 78c7469c56f..94029265a48 100644 --- a/hapi-tinder-plugin/pom.xml +++ b/hapi-tinder-plugin/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/hapi-tinder-test/pom.xml b/hapi-tinder-test/pom.xml index c8b8229c4ba..466e9d27784 100644 --- a/hapi-tinder-test/pom.xml +++ b/hapi-tinder-test/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index a7cae721347..e6f098ceece 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ ca.uhn.hapi.fhir hapi-fhir pom - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT HAPI-FHIR An open-source implementation of the FHIR specification in Java. diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml index ed8ad2356a4..f69c2fd2d79 100644 --- a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml @@ -7,7 +7,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-client/pom.xml b/tests/hapi-fhir-base-test-mindeps-client/pom.xml index 7e5d062d647..991c29eff82 100644 --- a/tests/hapi-fhir-base-test-mindeps-client/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-client/pom.xml @@ -4,7 +4,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../../pom.xml diff --git a/tests/hapi-fhir-base-test-mindeps-server/pom.xml b/tests/hapi-fhir-base-test-mindeps-server/pom.xml index 487e1f73df6..4e278702a42 100644 --- a/tests/hapi-fhir-base-test-mindeps-server/pom.xml +++ b/tests/hapi-fhir-base-test-mindeps-server/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir hapi-fhir - 7.5.0-SNAPSHOT + 7.5.1-SNAPSHOT ../../pom.xml