diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6da034c0d..bb25de3ff 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -34,7 +34,7 @@ jobs:
- name: Sonar - Analyze
# Dependabot has no access to the SONAR_TOKEN secret, so we need to skip sonar.
- if: ${{ github.actor != 'dependabot[bot]' }}
+ if: ${{ github.actor != 'dependabot[bot]' && github.repository_owner == 'ehrbase' }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
diff --git a/.github/workflows/report-sonar-results.yml b/.github/workflows/report-sonar-results.yml
new file mode 100644
index 000000000..0e208c68d
--- /dev/null
+++ b/.github/workflows/report-sonar-results.yml
@@ -0,0 +1,53 @@
+name: "Report Sonar Results"
+
+# we have multiple workflows - this helps to distinguish for them
+run-name: "${{ github.event.pull_request.title && github.event.pull_request.title || github.ref_name }} - Report Sonar Results"
+
+on:
+ workflow_run:
+ workflows: ["Build & Test"] # runs after build and test workflow
+ types:
+ - completed
+
+jobs:
+ #
+ # Collect Junit reports generated by build_and_test
+ #
+ collect-junit-reports:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Setup - Java 17
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: '17'
+ cache: 'maven'
+
+ # Download jacoco overall coverage from build & test output
+ - name: Download - Jacoco Overall Coverage
+ uses: actions/download-artifact@v4
+ with:
+ github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
+ run-id: ${{ github.event.workflow_run.id }} # download artifacts from build and test workflow
+ pattern: jacoco-coverage-overall # uses artifact of build and test workflow
+ merge-multiple: true
+ path: ./
+
+ - name: Sonar - Analyze
+ # Dependabot has no access to the SONAR_TOKEN secret, so we need to skip sonar.
+ # if: ${{ github.actor != 'dependabot[bot]' && github.repository_owner == 'ehrbase' }}
+ env:
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
+ run: |
+ mvn --batch-mode -DskipTests compile sonar:sonar \
+ -Dsonar.host.url=https://sonarcloud.io \
+ -Dsonar.organization=ehrbase \
+ -Dsonar.projectKey=ehrbase_openEHR_SDK \
+ -Dsonar.exclusions=test/** \
+ -Dsonar.coverage.exclusions=test/**,test-data/**/*,opt-14/**/*,response-dto/**/* \
+ -Dsonar.coverage.jacoco.xmlReportPaths=${{ github.workspace }}/test-coverage/target/site/jacoco-overall-coverage/jacoco.xml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38460bcbb..25cceb831 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
Note: version releases in the 0.x.y range may introduce breaking changes.
+## [2.11.0]
+ ### Added
+- Make AqlObjectPath serializable ([606](https://github.com/ehrbase/openEHR_SDK/pull/606))
+
## [2.10.0]
### Added
- Added EHRbase AQL `MeataData` debug execution data ([594](https://github.com/ehrbase/openEHR_SDK/pull/594))
@@ -402,3 +406,4 @@ Note: version releases in the 0.x.y range may introduce breaking changes.
[2.9.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.8.0...v2.9.0
[2.9.1]: https://github.com/ehrbase/openEHR_SDK/compare/v2.9.0...v2.9.1
[2.10.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.9.1...v2.10.0
+[2.11.0]: https://github.com/ehrbase/openEHR_SDK/compare/v2.10.0...v2.11.0
diff --git a/aql/pom.xml b/aql/pom.xml
index d9c5e2097..251617c0a 100644
--- a/aql/pom.xml
+++ b/aql/pom.xml
@@ -25,7 +25,7 @@
org.ehrbase.openehr.sdk
sdk-parent
- 2.10.0
+ 2.11.0
aql
diff --git a/aql/src/main/java/org/ehrbase/openehr/sdk/aql/dto/path/AqlObjectPath.java b/aql/src/main/java/org/ehrbase/openehr/sdk/aql/dto/path/AqlObjectPath.java
index 5f686e2f5..e87f92528 100644
--- a/aql/src/main/java/org/ehrbase/openehr/sdk/aql/dto/path/AqlObjectPath.java
+++ b/aql/src/main/java/org/ehrbase/openehr/sdk/aql/dto/path/AqlObjectPath.java
@@ -17,6 +17,8 @@
*/
package org.ehrbase.openehr.sdk.aql.dto.path;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
@@ -28,9 +30,13 @@
import org.ehrbase.openehr.sdk.aql.dto.operand.PathPredicateOperand;
import org.ehrbase.openehr.sdk.aql.parser.AqlQueryParser;
import org.ehrbase.openehr.sdk.aql.render.AqlRenderer;
+import org.ehrbase.openehr.sdk.aql.serializer.ObjectPathDeserializer;
+import org.ehrbase.openehr.sdk.aql.serializer.ObjectPathSerializer;
import org.ehrbase.openehr.sdk.aql.webtemplatepath.AqlPath;
import org.ehrbase.openehr.sdk.util.Freezable;
+@JsonSerialize(using = ObjectPathSerializer.class)
+@JsonDeserialize(using = ObjectPathDeserializer.class)
public final class AqlObjectPath implements PathPredicateOperand {
public static class PathNode implements Freezable {
diff --git a/aql/src/main/java/org/ehrbase/openehr/sdk/aql/serializer/AqlQueryObjectMapperProvider.java b/aql/src/main/java/org/ehrbase/openehr/sdk/aql/serializer/AqlQueryObjectMapperProvider.java
index aa8bf6acb..ba26b18e0 100644
--- a/aql/src/main/java/org/ehrbase/openehr/sdk/aql/serializer/AqlQueryObjectMapperProvider.java
+++ b/aql/src/main/java/org/ehrbase/openehr/sdk/aql/serializer/AqlQueryObjectMapperProvider.java
@@ -19,8 +19,6 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import org.ehrbase.openehr.sdk.aql.dto.path.AqlObjectPath;
/**
* @author Stefan Spiska
@@ -39,14 +37,7 @@ public static ObjectMapper getObjectMapper() {
}
private static ObjectMapper init() {
-
ObjectMapper aqlobjectMapper = new ObjectMapper();
-
- SimpleModule simpleModule = new SimpleModule();
- simpleModule.addSerializer(AqlObjectPath.class, new ObjectPathSerializer());
- simpleModule.addDeserializer(AqlObjectPath.class, new ObjectPathDeserializer());
-
- aqlobjectMapper.registerModule(simpleModule);
aqlobjectMapper.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);
return aqlobjectMapper;
}
diff --git a/bom/pom.xml b/bom/pom.xml
index f53667207..fd1886f2e 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -8,7 +8,7 @@
bom
org.ehrbase.openehr.sdk
- 2.10.0
+ 2.11.0
pom
openEHR SDK
diff --git a/client/pom.xml b/client/pom.xml
index 2a1556f04..6fd423b89 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -26,7 +26,7 @@
org.ehrbase.openehr.sdk
sdk-parent
- 2.10.0
+ 2.11.0
client
diff --git a/example-generator/pom.xml b/example-generator/pom.xml
index 2a0631889..060e5b005 100644
--- a/example-generator/pom.xml
+++ b/example-generator/pom.xml
@@ -5,7 +5,7 @@
sdk-parent
org.ehrbase.openehr.sdk
- 2.10.0
+ 2.11.0
4.0.0
diff --git a/generator-commons/pom.xml b/generator-commons/pom.xml
index e2f55f2a3..79aec22cd 100644
--- a/generator-commons/pom.xml
+++ b/generator-commons/pom.xml
@@ -6,7 +6,7 @@
org.ehrbase.openehr.sdk
sdk-parent
- 2.10.0
+ 2.11.0
generator-commons
diff --git a/generator-maven-plugin/pom.xml b/generator-maven-plugin/pom.xml
index 6d0caa0a3..1522c7642 100644
--- a/generator-maven-plugin/pom.xml
+++ b/generator-maven-plugin/pom.xml
@@ -5,7 +5,7 @@
sdk-parent
org.ehrbase.openehr.sdk
- 2.10.0
+ 2.11.0
4.0.0
diff --git a/generator/pom.xml b/generator/pom.xml
index e4966288c..7d4c6d887 100644
--- a/generator/pom.xml
+++ b/generator/pom.xml
@@ -25,7 +25,7 @@
org.ehrbase.openehr.sdk
sdk-parent
- 2.10.0
+ 2.11.0
generator
diff --git a/opt-1.4/pom.xml b/opt-1.4/pom.xml
index 575d52849..c414745e7 100644
--- a/opt-1.4/pom.xml
+++ b/opt-1.4/pom.xml
@@ -26,7 +26,7 @@
org.ehrbase.openehr.sdk
sdk-parent
- 2.10.0
+ 2.11.0
opt-1.4
diff --git a/pom.xml b/pom.xml
index 8057b62ec..1eb1a9b6a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,13 +25,13 @@
org.ehrbase.openehr.sdk
bom
- 2.10.0
+ 2.11.0
./bom/pom.xml
org.ehrbase.openehr.sdk
sdk-parent
- 2.10.0
+ 2.11.0
pom
openEHR SDK
diff --git a/response-dto/pom.xml b/response-dto/pom.xml
index cb667e599..dfcdfe3d1 100644
--- a/response-dto/pom.xml
+++ b/response-dto/pom.xml
@@ -26,7 +26,7 @@
org.ehrbase.openehr.sdk
sdk-parent
- 2.10.0
+ 2.11.0
response-dto
diff --git a/response-dto/src/main/java/org/ehrbase/openehr/sdk/response/dto/MetaData.java b/response-dto/src/main/java/org/ehrbase/openehr/sdk/response/dto/MetaData.java
index b163a2d0c..835155bb1 100644
--- a/response-dto/src/main/java/org/ehrbase/openehr/sdk/response/dto/MetaData.java
+++ b/response-dto/src/main/java/org/ehrbase/openehr/sdk/response/dto/MetaData.java
@@ -44,6 +44,8 @@ public class MetaData {
* @see MetaData#setAdditionalProperty(String, Object)
* @param of the additional property.
*/
+ @SuppressWarnings("unused")
+ @Deprecated(forRemoval = true)
public interface AdditionalProperty extends Function