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 49396a1377485c3bd38f0bc47f182531fa8afdf9 Author: Nicolas Filotto <[email protected]> AuthorDate: Wed Apr 6 15:47:29 2022 +0200 CAMEL-17792: Add doc about the message headers of camel-workday --- .../resources/org/apache/camel/component/workday/workday.json | 3 +++ components/camel-workday/src/main/docs/workday-component.adoc | 4 +++- .../main/java/org/apache/camel/component/workday/WorkdayEndpoint.java | 3 ++- .../camel/component/workday/producer/WorkdayDefaultProducer.java | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/components/camel-workday/src/generated/resources/org/apache/camel/component/workday/workday.json b/components/camel-workday/src/generated/resources/org/apache/camel/component/workday/workday.json index d48119c1570..4fbfe757c90 100644 --- a/components/camel-workday/src/generated/resources/org/apache/camel/component/workday/workday.json +++ b/components/camel-workday/src/generated/resources/org/apache/camel/component/workday/workday.json @@ -25,6 +25,9 @@ "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": { + "CamelWorkdayURL": { "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The workday URL" } + }, "properties": { "entity": { "kind": "path", "displayName": "Entity", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.workday.WorkdayConfiguration.Entity", "enum": [ "report", "commonAPI" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.workday.WorkdayConfiguration", "configurationField": "workdayConfiguration", "description": "The entity to be requested o [...] "path": { "kind": "path", "displayName": "Path", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.workday.WorkdayConfiguration", "configurationField": "workdayConfiguration", "description": "The API path to access an entity structure." }, diff --git a/components/camel-workday/src/main/docs/workday-component.adoc b/components/camel-workday/src/main/docs/workday-component.adoc index b1cf9931979..c727c1bf377 100644 --- a/components/camel-workday/src/main/docs/workday-component.adoc +++ b/components/camel-workday/src/main/docs/workday-component.adoc @@ -44,7 +44,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 include::spring-boot:partial$starter.adoc[] diff --git a/components/camel-workday/src/main/java/org/apache/camel/component/workday/WorkdayEndpoint.java b/components/camel-workday/src/main/java/org/apache/camel/component/workday/WorkdayEndpoint.java index a03641b12e1..6907685b53b 100644 --- a/components/camel-workday/src/main/java/org/apache/camel/component/workday/WorkdayEndpoint.java +++ b/components/camel-workday/src/main/java/org/apache/camel/component/workday/WorkdayEndpoint.java @@ -21,6 +21,7 @@ import org.apache.camel.Consumer; import org.apache.camel.Processor; import org.apache.camel.Producer; import org.apache.camel.component.workday.producer.WorkdayCommonAPIProducer; +import org.apache.camel.component.workday.producer.WorkdayDefaultProducer; import org.apache.camel.component.workday.producer.WorkdayReportProducer; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -30,7 +31,7 @@ import org.apache.camel.support.DefaultEndpoint; * Detect and parse documents using Workday. */ @UriEndpoint(firstVersion = "3.1.0", scheme = "workday", title = "Workday", syntax = "workday:entity:path", producerOnly = true, - category = { Category.CLOUD, Category.API, Category.HCM }) + category = { Category.CLOUD, Category.API, Category.HCM }, headersClass = WorkdayDefaultProducer.class) public class WorkdayEndpoint extends DefaultEndpoint { @UriParam diff --git a/components/camel-workday/src/main/java/org/apache/camel/component/workday/producer/WorkdayDefaultProducer.java b/components/camel-workday/src/main/java/org/apache/camel/component/workday/producer/WorkdayDefaultProducer.java index 85f640c1251..b5545bdfeed 100644 --- a/components/camel-workday/src/main/java/org/apache/camel/component/workday/producer/WorkdayDefaultProducer.java +++ b/components/camel-workday/src/main/java/org/apache/camel/component/workday/producer/WorkdayDefaultProducer.java @@ -21,6 +21,7 @@ import org.apache.camel.component.workday.WorkdayConfiguration; import org.apache.camel.component.workday.WorkdayEndpoint; import org.apache.camel.component.workday.auth.AuthClientForIntegration; import org.apache.camel.component.workday.auth.AutheticationClient; +import org.apache.camel.spi.Metadata; import org.apache.camel.support.DefaultProducer; import org.apache.http.HttpStatus; import org.apache.http.client.methods.CloseableHttpResponse; @@ -36,6 +37,7 @@ import org.slf4j.LoggerFactory; */ public abstract class WorkdayDefaultProducer extends DefaultProducer { + @Metadata(description = "The workday URL", javaType = "String") public static final String WORKDAY_URL_HEADER = "CamelWorkdayURL"; private static final Logger LOG = LoggerFactory.getLogger(WorkdayReportProducer.class);
