You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2022/03/16 07:29:06 UTC
[camel-quarkus] branch main updated: Disable FHIR versions not required by default
This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 63b36f4 Disable FHIR versions not required by default
63b36f4 is described below
commit 63b36f4b364bf796aad7d9eeb128792ffe9b369e
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Mar 15 15:13:50 2022 +0000
Disable FHIR versions not required by default
---
docs/modules/ROOT/pages/reference/extensions/fhir.adoc | 11 ++++++-----
extensions/fhir/runtime/src/main/doc/configuration.adoc | 3 ++-
.../org/apache/camel/quarkus/component/fhir/FhirConfig.java | 8 ++++----
.../org/apache/camel/quarkus/component/fhir/FhirFlags.java | 4 ++--
.../fhir/src/main/resources/application.properties | 6 +++---
5 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/fhir.adoc b/docs/modules/ROOT/pages/reference/extensions/fhir.adoc
index a65937f..5ffb852 100644
--- a/docs/modules/ROOT/pages/reference/extensions/fhir.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/fhir.adoc
@@ -49,7 +49,8 @@ https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
== Additional Camel Quarkus configuration
-The https://hapifhir.io/download.html[hapi-fhir] library, on which camel-fhir depends on, heavily uses reflection which affects performance in Quarkus (memory footprint, build time, CPU resources etc...). The following options are provided to improve on this:
+
+By default, only FHIR versions `R4` & `DSTU3` are enabled in native mode, since they are the default values on the FHIR component and DataFormat.
[width="100%",cols="80,5,15",options="header"]
@@ -59,25 +60,25 @@ The https://hapifhir.io/download.html[hapi-fhir] library, on which camel-fhir de
|icon:lock[title=Fixed at build time] [[quarkus.camel.fhir.enable-dstu2]]`link:#quarkus.camel.fhir.enable-dstu2[quarkus.camel.fhir.enable-dstu2]`
-Enable FHIR DSTU2 Specs.
+Enable FHIR DSTU2 Specs in native mode.
| `boolean`
| `true`
|icon:lock[title=Fixed at build time] [[quarkus.camel.fhir.enable-dstu3]]`link:#quarkus.camel.fhir.enable-dstu3[quarkus.camel.fhir.enable-dstu3]`
-Enable FHIR DSTU3 Specs.
+Enable FHIR DSTU3 Specs in native mode.
| `boolean`
| `true`
|icon:lock[title=Fixed at build time] [[quarkus.camel.fhir.enable-r4]]`link:#quarkus.camel.fhir.enable-r4[quarkus.camel.fhir.enable-r4]`
-Enable FHIR R4 Specs.
+Enable FHIR R4 Specs in native mode.
| `boolean`
| `true`
|icon:lock[title=Fixed at build time] [[quarkus.camel.fhir.enable-r5]]`link:#quarkus.camel.fhir.enable-r5[quarkus.camel.fhir.enable-r5]`
-Enable FHIR R5 Specs.
+Enable FHIR R5 Specs in native mode.
| `boolean`
| `true`
|===
diff --git a/extensions/fhir/runtime/src/main/doc/configuration.adoc b/extensions/fhir/runtime/src/main/doc/configuration.adoc
index c915eb5..820a98a 100644
--- a/extensions/fhir/runtime/src/main/doc/configuration.adoc
+++ b/extensions/fhir/runtime/src/main/doc/configuration.adoc
@@ -1 +1,2 @@
-The https://hapifhir.io/download.html[hapi-fhir] library, on which camel-fhir depends on, heavily uses reflection which affects performance in Quarkus (memory footprint, build time, CPU resources etc...). The following options are provided to improve on this:
\ No newline at end of file
+
+By default, only FHIR versions `R4` & `DSTU3` are enabled in native mode, since they are the default values on the FHIR component and DataFormat.
diff --git a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java
index 33f151f..534f5be 100644
--- a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java
+++ b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirConfig.java
@@ -24,25 +24,25 @@ import io.quarkus.runtime.annotations.ConfigRoot;
public final class FhirConfig {
/**
- * Enable FHIR DSTU2 Specs.
+ * Enable FHIR DSTU2 Specs in native mode.
*/
@ConfigItem(name = "enable-dstu2", defaultValue = "true")
public boolean enableDstu2;
/**
- * Enable FHIR DSTU3 Specs.
+ * Enable FHIR DSTU3 Specs in native mode.
*/
@ConfigItem(name = "enable-dstu3", defaultValue = "true")
public boolean enableDstu3;
/**
- * Enable FHIR R4 Specs.
+ * Enable FHIR R4 Specs in native mode.
*/
@ConfigItem(name = "enable-r4", defaultValue = "true")
public boolean enableR4;
/**
- * Enable FHIR R5 Specs.
+ * Enable FHIR R5 Specs in native mode.
*/
@ConfigItem(name = "enable-r5", defaultValue = "true")
public boolean enableR5;
diff --git a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirFlags.java b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirFlags.java
index 3c504bf..6267a21 100644
--- a/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirFlags.java
+++ b/extensions/fhir/runtime/src/main/java/org/apache/camel/quarkus/component/fhir/FhirFlags.java
@@ -28,7 +28,7 @@ public final class FhirFlags {
@Override
public boolean getAsBoolean() {
return ConfigProvider.getConfig().getOptionalValue("quarkus.camel.fhir.enable-dstu2", Boolean.class)
- .orElse(Boolean.TRUE);
+ .orElse(Boolean.FALSE);
}
}
@@ -52,7 +52,7 @@ public final class FhirFlags {
@Override
public boolean getAsBoolean() {
return ConfigProvider.getConfig().getOptionalValue("quarkus.camel.fhir.enable-r5", Boolean.class)
- .orElse(Boolean.TRUE);
+ .orElse(Boolean.FALSE);
}
}
}
diff --git a/integration-tests/fhir/src/main/resources/application.properties b/integration-tests/fhir/src/main/resources/application.properties
index af49acc..345ad56 100644
--- a/integration-tests/fhir/src/main/resources/application.properties
+++ b/integration-tests/fhir/src/main/resources/application.properties
@@ -19,10 +19,10 @@
# Quarkus :: Camel :: FHIR
#
# The HAPI-FHIR library, on which camel-fhir depends on, heavily uses reflection which affects performance in Quarkus
-# (memory footprint, build time, CPU resources etc...). For the sake of time, only R5 is tested by default. To test
+# (memory footprint, build time, CPU resources etc...). For the sake of time, only R4 is tested by default. To test
# additional FHIR versions, set the following configuration properties to true.
#
quarkus.camel.fhir.enable-dstu2=false
quarkus.camel.fhir.enable-dstu3=false
-quarkus.camel.fhir.enable-r4=false
-quarkus.camel.fhir.enable-r5=true
+quarkus.camel.fhir.enable-r4=true
+quarkus.camel.fhir.enable-r5=false