This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-12644
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1cae8d22c0e0bfcb4cd0c3365d04956662ae3e3f
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Jul 17 15:44:25 2018 +0200

    CAMEL-12644: Generate spring boot auto configuration in the docs.
---
 .../src/main/docs/fhirJson-dataformat.adoc               | 16 +++++++++++++++-
 .../src/main/docs/fhirXml-dataformat.adoc                | 16 +++++++++++++++-
 .../UpdateSpringBootAutoConfigurationReadmeMojo.java     |  4 +++-
 3 files changed, 33 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-fhir/camel-fhir-component/src/main/docs/fhirJson-dataformat.adoc
 
b/components/camel-fhir/camel-fhir-component/src/main/docs/fhirJson-dataformat.adoc
index 1b00d3e..fd884c2 100644
--- 
a/components/camel-fhir/camel-fhir-component/src/main/docs/fhirJson-dataformat.adoc
+++ 
b/components/camel-fhir/camel-fhir-component/src/main/docs/fhirJson-dataformat.adoc
@@ -28,5 +28,19 @@ The FHIR JSon dataformat supports 2 options, which are 
listed below.
 === Spring Boot Auto-Configuration
 
 
-The component has no Spring Boot auto configuration options.
+The component supports 3 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.dataformat.fhirjson.content-type-header* | Whether the data format 
should set the Content-Type header with the type
+ from the data format if the data format is capable of doing so. For
+ example application/xml for data formats marshalling to XML, or
+ application/json for data formats marshalling to JSon etc. | false | Boolean
+| *camel.dataformat.fhirjson.enabled* |  |  | Boolean
+| *camel.dataformat.fhirjson.fhir-version* | The version of FHIR to use. 
Possible values are:
+ DSTU2,DSTU2_HL7ORG,DSTU2_1,DSTU3,R4 | DSTU3 | String
+|===
 // spring-boot-auto-configure options: END
diff --git 
a/components/camel-fhir/camel-fhir-component/src/main/docs/fhirXml-dataformat.adoc
 
b/components/camel-fhir/camel-fhir-component/src/main/docs/fhirXml-dataformat.adoc
index 2a2b666..d72e0d9 100644
--- 
a/components/camel-fhir/camel-fhir-component/src/main/docs/fhirXml-dataformat.adoc
+++ 
b/components/camel-fhir/camel-fhir-component/src/main/docs/fhirXml-dataformat.adoc
@@ -27,5 +27,19 @@ The FHIR XML dataformat supports 2 options, which are listed 
below.
 === Spring Boot Auto-Configuration
 
 
-The component has no Spring Boot auto configuration options.
+The component supports 3 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.dataformat.fhirxml.content-type-header* | Whether the data format 
should set the Content-Type header with the type
+ from the data format if the data format is capable of doing so. For
+ example application/xml for data formats marshalling to XML, or
+ application/json for data formats marshalling to JSon etc. | false | Boolean
+| *camel.dataformat.fhirxml.enabled* |  |  | Boolean
+| *camel.dataformat.fhirxml.fhir-version* | The version of FHIR to use. 
Possible values are:
+ DSTU2,DSTU2_HL7ORG,DSTU2_1,DSTU3,R4 | DSTU3 | String
+|===
 // spring-boot-auto-configure options: END
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
index bbad88a..3182ca5 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/UpdateSpringBootAutoConfigurationReadmeMojo.java
@@ -24,6 +24,7 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Locale;
 import java.util.stream.Collectors;
 
 import 
org.apache.camel.maven.packaging.model.SpringBootAutoConfigureOptionModel;
@@ -174,7 +175,8 @@ public class UpdateSpringBootAutoConfigurationReadmeMojo 
extends AbstractMojo {
                         for (File docFile : files) {
                             String docName = docFile.getName();
                             int pos = docName.lastIndexOf("-");
-                            String prefix = pos > 0 ? docName.substring(0, 
pos) : null;
+                            // spring-boot use lower cased keys
+                            String prefix = pos > 0 ? docName.substring(0, 
pos).toLowerCase(Locale.US) : null;
 
                             List models = 
parseSpringBootAutoConfigureModels(jsonFile, prefix);
                             String options = 
templateAutoConfigurationOptions(models);

Reply via email to