You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/04/04 16:48:20 UTC

[camel] 05/06: CAMEL-17792: Add doc about the message headers of camel-robotframework

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

nfilotto pushed a commit to branch CAMEL-17792/doc-message-headers
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 442f04c64c8afb5987867145bdae11c42691e25d
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Mon Apr 4 17:45:36 2022 +0200

    CAMEL-17792: Add doc about the message headers of camel-robotframework
---
 .../org/apache/camel/component/robotframework/robotframework.json   | 5 +++++
 .../src/main/docs/robotframework-component.adoc                     | 6 +++++-
 .../component/robotframework/RobotFrameworkCamelConstants.java      | 5 +++++
 .../camel/component/robotframework/RobotFrameworkEndpoint.java      | 3 ++-
 4 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/components/camel-robotframework/src/generated/resources/org/apache/camel/component/robotframework/robotframework.json b/components/camel-robotframework/src/generated/resources/org/apache/camel/component/robotframework/robotframework.json
index 3f0c8642f3e..22b9b62cab8 100644
--- a/components/camel-robotframework/src/generated/resources/org/apache/camel/component/robotframework/robotframework.json
+++ b/components/camel-robotframework/src/generated/resources/org/apache/camel/component/robotframework/robotframework.json
@@ -74,6 +74,11 @@
     "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
     "configuration": { "kind": "property", "displayName": "Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "The configuration" }
   },
+  "headers": {
+    "CamelRobotVariables": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "List<String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The robot variables." },
+    "CamelRobotReturnCode": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The return code." },
+    "CamelRobotResourceUri": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The new resource URI." }
+  },
   "properties": {
     "resourceUri": { "kind": "path", "displayName": "Resource Uri", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath is default). ref will lookup the resource in the registry. bean will c [...]
     "allowContextMapAll": { "kind": "parameter", "displayName": "Allow Context Map All", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.robotframework.RobotFrameworkCamelConfiguration", "configurationField": "configuration", "description": "Sets whether the context map should allow access to all details. By defaul [...]
diff --git a/components/camel-robotframework/src/main/docs/robotframework-component.adoc b/components/camel-robotframework/src/main/docs/robotframework-component.adoc
index 423ec3bb3d7..a5d5e1cecd4 100644
--- a/components/camel-robotframework/src/main/docs/robotframework-component.adoc
+++ b/components/camel-robotframework/src/main/docs/robotframework-component.adoc
@@ -58,9 +58,13 @@ include::partial$component-endpoint-options.adoc[]
 
 // endpoint options: END
 
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
+
 == Samples
 
-For example you could use something like:
+For example, you could use something like:
 
 [source,java]
 ----
diff --git a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelConstants.java b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelConstants.java
index 8fa39857be3..feb98b43f6d 100644
--- a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelConstants.java
+++ b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkCamelConstants.java
@@ -16,10 +16,15 @@
  */
 package org.apache.camel.component.robotframework;
 
+import org.apache.camel.spi.Metadata;
+
 public interface RobotFrameworkCamelConstants {
 
+    @Metadata(description = "The robot variables.", javaType = "List<String>")
     String CAMEL_ROBOT_VARIABLES = "CamelRobotVariables";
+    @Metadata(description = "The return code.", javaType = "Integer")
     String CAMEL_ROBOT_RETURN_CODE = "CamelRobotReturnCode";
+    @Metadata(description = "The new resource URI.", javaType = "String")
     String CAMEL_ROBOT_RESOURCE_URI = "CamelRobotResourceUri";
 
 }
diff --git a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkEndpoint.java b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkEndpoint.java
index 7cf6fbc000f..a3f3d8040b0 100644
--- a/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkEndpoint.java
+++ b/components/camel-robotframework/src/main/java/org/apache/camel/component/robotframework/RobotFrameworkEndpoint.java
@@ -33,7 +33,8 @@ import org.robotframework.RobotFramework;
  * Pass camel exchanges to acceptence test written in Robot DSL.
  */
 @UriEndpoint(firstVersion = "3.0.0", scheme = "robotframework", title = "Robot Framework",
-             syntax = "robotframework:resourceUri", category = { Category.TESTING })
+             syntax = "robotframework:resourceUri", category = { Category.TESTING },
+             headersClass = RobotFrameworkCamelConstants.class)
 public class RobotFrameworkEndpoint extends ResourceEndpoint {
 
     @UriParam