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 b032fdb8d58a9d74c9c80575fefebbdd4e3e7f53
Author: Nicolas Filotto <nfilo...@talend.com>
AuthorDate: Mon Apr 4 18:45:46 2022 +0200

    CAMEL-17792: Add doc about the message headers of camel-rss
---
 .../resources/org/apache/camel/component/rss/rss.json      |  3 +++
 components/camel-rss/src/main/docs/rss-component.adoc      | 14 +++-----------
 .../java/org/apache/camel/component/rss/RssConstants.java  |  5 ++++-
 .../java/org/apache/camel/component/rss/RssEndpoint.java   |  3 ++-
 4 files changed, 12 insertions(+), 13 deletions(-)

diff --git 
a/components/camel-rss/src/generated/resources/org/apache/camel/component/rss/rss.json
 
b/components/camel-rss/src/generated/resources/org/apache/camel/component/rss/rss.json
index b8b9c25125f..7c0f8893e2f 100644
--- 
a/components/camel-rss/src/generated/resources/org/apache/camel/component/rss/rss.json
+++ 
b/components/camel-rss/src/generated/resources/org/apache/camel/component/rss/rss.json
@@ -25,6 +25,9 @@
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Allows for bridging the 
consumer to the Camel routing Error Handler, which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages, or the likes, will 
now be processed as a me [...]
     "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 [...]
   },
+  "headers": {
+    "CamelRssFeed": { "kind": "header", "displayName": "", "group": 
"consumer", "label": "", "required": false, "javaType": "Object", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The entire SyncFeed object." }
+  },
   "properties": {
     "feedUri": { "kind": "path", "displayName": "Feed Uri", "group": 
"consumer", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "description": "The URI to the feed to poll." },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "description": "Allows for bridging the 
consumer to the Camel routing Error Handler, which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages, or the likes, will 
now be processed as a m [...]
diff --git a/components/camel-rss/src/main/docs/rss-component.adoc 
b/components/camel-rss/src/main/docs/rss-component.adoc
index be35e1ce010..d13d4adbea5 100644
--- a/components/camel-rss/src/main/docs/rss-component.adoc
+++ b/components/camel-rss/src/main/docs/rss-component.adoc
@@ -51,7 +51,9 @@ include::partial$component-endpoint-options.adoc[]
 // endpoint options: START
 
 // endpoint options: END
-
+// component headers: START
+include::partial$component-endpoint-headers.adoc[]
+// component headers: END
 
 == Exchange data types
 
@@ -68,16 +70,6 @@ a `SyndFeed` with one `SyndEntry` or a `java.util.List` of 
`SyndEntrys`.
 |`splitEntries` |`false` |The entire list of entries from the current feed is 
set in the exchange.
 |=======================================================================
 
-== Message Headers
-
-[width="100%",cols="10%,90%",options="header",]
-|=======================================================================
-|Header |Description
-
-|`CamelRssFeed` |The entire `SyncFeed` object.
-|=======================================================================
-
-
 == Example
 
 If the URL for the RSS feed uses query parameters, this component will
diff --git 
a/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssConstants.java
 
b/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssConstants.java
index 33cebd43c87..c636b3d1b0b 100644
--- 
a/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssConstants.java
+++ 
b/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssConstants.java
@@ -16,15 +16,18 @@
  */
 package org.apache.camel.component.rss;
 
+import org.apache.camel.spi.Metadata;
+
 /**
  * RSS Constants.
  */
 public final class RssConstants {
 
     /**
-     * Header key for the {@link com.sun.syndication.feed.synd.SyndFeed} 
object is stored on the in message on the
+     * Header key for the {@link com.rometools.rome.feed.synd.SyndFeed} object 
is stored on the in message on the
      * exchange.
      */
+    @Metadata(description = "The entire `SyncFeed` object.", javaType = 
"Object")
     public static final String RSS_FEED = "CamelRssFeed";
 
     private RssConstants() {
diff --git 
a/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssEndpoint.java
 
b/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssEndpoint.java
index c17b251702f..c70f395e64f 100644
--- 
a/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssEndpoint.java
+++ 
b/components/camel-rss/src/main/java/org/apache/camel/component/rss/RssEndpoint.java
@@ -36,7 +36,8 @@ import org.slf4j.LoggerFactory;
  * Poll RSS feeds.
  */
 @UriEndpoint(firstVersion = "2.0.0", scheme = "rss", extendsScheme = "atom", 
title = "RSS",
-             syntax = "rss:feedUri", consumerOnly = true, category = { 
Category.RSS }, lenientProperties = true)
+             syntax = "rss:feedUri", consumerOnly = true, category = { 
Category.RSS }, lenientProperties = true,
+             headersClass = RssConstants.class)
 public class RssEndpoint extends FeedEndpoint {
     protected static final Logger LOG = 
LoggerFactory.getLogger(RssEndpoint.class);
 

Reply via email to