You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/09/17 16:23:45 UTC

[camel] 01/03: CAMEL-15478: Include more details in docs

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

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

commit 941d4440cd0e38dc70348f23fe397a44100cbdea
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Sep 17 17:59:15 2020 +0200

    CAMEL-15478: Include more details in docs
---
 .../src/main/java/org/apache/camel/maven/packaging/MvelHelper.java | 4 ++++
 .../src/main/resources/endpoint-options.mvel                       | 7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MvelHelper.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MvelHelper.java
index 7acddcb..72dbe9e 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MvelHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MvelHelper.java
@@ -47,6 +47,10 @@ public final class MvelHelper {
         return escapedUrls;
     }
 
+    public static String componentName(String scheme) {
+        return Character.toUpperCase(scheme.charAt(0)) + scheme.substring(1);
+    }
+
     public static String formatSignature(String signature) {
         signature = signature.replace('$', '.');
         return signature + ";";
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
index fa4d5b4..d6ca847 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
+++ b/tooling/maven/camel-package-maven-plugin/src/main/resources/endpoint-options.mvel
@@ -84,6 +84,13 @@ The @{api.name} API method(s) has the following set of parameters listed in the
 In addition to the parameters above, the @{api.name} API can also use from the @{endpointParameterOptions.size()} endpoint query option
 which is listed in the _Query Parameters_ section.
 
+==== Message headers and body
+
+Any of the parameters can be provided in either the endpoint URI, or dynamically in a message header.
+The message header name must be of the format `Camel@{util.componentName(scheme)}.parameter`.
+The `inBody` parameter overrides message header, i.e. the endpoint parameter `inBody=myParameterNameHere`
+would override a `Camel@{util.componentName(scheme)}.myParameterNameHere` header.
+
 @end{}
 @end{}