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 f8156a0db4b83769d4cc07fad6643142714723a3 Author: Nicolas Filotto <[email protected]> AuthorDate: Wed Apr 6 15:52:08 2022 +0200 CAMEL-17792: Add doc about the message headers of camel-xchange --- .../resources/org/apache/camel/component/xchange/xchange.json | 4 ++++ components/camel-xchange/src/main/docs/xchange-component.adoc | 4 +++- .../java/org/apache/camel/component/xchange/XChangeConfiguration.java | 2 ++ .../main/java/org/apache/camel/component/xchange/XChangeEndpoint.java | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/components/camel-xchange/src/generated/resources/org/apache/camel/component/xchange/xchange.json b/components/camel-xchange/src/generated/resources/org/apache/camel/component/xchange/xchange.json index 353e6624cbe..042adb0d8c2 100644 --- a/components/camel-xchange/src/generated/resources/org/apache/camel/component/xchange/xchange.json +++ b/components/camel-xchange/src/generated/resources/org/apache/camel/component/xchange/xchange.json @@ -25,6 +25,10 @@ "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...] "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": { + "Currency": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.knowm.xchange.currency.Currency", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The target currency" }, + "CurrencyPair": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.knowm.xchange.currency.CurrencyPair", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The target currency pair" } + }, "properties": { "name": { "kind": "path", "displayName": "Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.xchange.XChangeConfiguration", "configurationField": "configuration", "description": "The exchange to connect to" }, "currency": { "kind": "parameter", "displayName": "Currency", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.knowm.xchange.currency.Currency", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.xchange.XChangeConfiguration", "configurationField": "configuration", "description": "The currency" }, diff --git a/components/camel-xchange/src/main/docs/xchange-component.adoc b/components/camel-xchange/src/main/docs/xchange-component.adoc index a57262c7bf5..69935df6569 100644 --- a/components/camel-xchange/src/main/docs/xchange-component.adoc +++ b/components/camel-xchange/src/main/docs/xchange-component.adoc @@ -52,7 +52,9 @@ include::partial$component-endpoint-options.adoc[] // endpoint options: END - +// component headers: START +include::partial$component-endpoint-headers.adoc[] +// component headers: END == Authentication diff --git a/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeConfiguration.java b/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeConfiguration.java index b783d29ba80..d8a0c41b357 100644 --- a/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeConfiguration.java +++ b/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeConfiguration.java @@ -48,7 +48,9 @@ public class XChangeConfiguration { ticker } + @Metadata(description = "The target currency", javaType = "org.knowm.xchange.currency.Currency") public static final String HEADER_CURRENCY = "Currency"; + @Metadata(description = "The target currency pair", javaType = "org.knowm.xchange.currency.CurrencyPair") public static final String HEADER_CURRENCY_PAIR = "CurrencyPair"; @UriPath(description = "The exchange to connect to") diff --git a/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeEndpoint.java b/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeEndpoint.java index 180c7e86147..866d79ec5ad 100644 --- a/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeEndpoint.java +++ b/components/camel-xchange/src/main/java/org/apache/camel/component/xchange/XChangeEndpoint.java @@ -49,7 +49,7 @@ import org.knowm.xchange.utils.Assert; * Access market data and trade on Bitcoin and Altcoin exchanges. */ @UriEndpoint(firstVersion = "2.21.0", scheme = "xchange", title = "XChange", syntax = "xchange:name", producerOnly = true, - category = { Category.BITCOIN, Category.BLOCKCHAIN }) + category = { Category.BITCOIN, Category.BLOCKCHAIN }, headersClass = XChangeConfiguration.class) public class XChangeEndpoint extends DefaultEndpoint { @UriParam
