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 2b3945ae78dab060f6dfc5532e290ea924d2e27a Author: Nicolas Filotto <[email protected]> AuthorDate: Wed Mar 30 16:32:25 2022 +0200 CAMEL-17792: Add doc about the message headers of camel-jira --- .../org/apache/camel/component/jira/jira.json | 20 ++++++++++++++++++++ .../camel-jira/src/main/docs/jira-component.adoc | 3 +++ .../apache/camel/component/jira/JiraConstants.java | 21 +++++++++++++++++++++ .../apache/camel/component/jira/JiraEndpoint.java | 2 +- 4 files changed, 45 insertions(+), 1 deletion(-) diff --git a/components/camel-jira/src/generated/resources/org/apache/camel/component/jira/jira.json b/components/camel-jira/src/generated/resources/org/apache/camel/component/jira/jira.json index 436ecca..59f5621 100644 --- a/components/camel-jira/src/generated/resources/org/apache/camel/component/jira/jira.json +++ b/components/camel-jira/src/generated/resources/org/apache/camel/component/jira/jira.json @@ -35,6 +35,26 @@ "username": { "kind": "property", "displayName": "Username", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.jira.JiraConfiguration", "configurationField": "configuration", "description": "(Basic authentication only) The username to authenticate to the Jira server. Use only if OAuth is not enabled on the Jira server. [...] "verificationCode": { "kind": "property", "displayName": "Verification Code", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.jira.JiraConfiguration", "configurationField": "configuration", "description": "(OAuth only) The verification code from Jira generated in the first step of the authorization proccess." } }, + "headers": { + "IssueAssignee": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The assignee's name of the issue" }, + "IssueComponents": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List<String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The comments of the issue" }, + "IssueChanged": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the updated field (i.e Status)" }, + "IssueKey": { "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the issue" }, + "IssuePriorityId": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's id of the issue" }, + "IssuePriorityName": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The priority's name of the issue" }, + "ProjectKey": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The project's id of the issue" }, + "IssueSummary": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The summary of the issue" }, + "IssueTransitionId": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The transition id" }, + "IssueTypeId": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "Long", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's id of the issue" }, + "IssueTypeName": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type's name of the issue" }, + "IssueWatchedIssues": { "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The list of all issue keys that are watched in the time of update" }, + "IssueWatchersAdd": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List<String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The watchers of the issue to add" }, + "IssueWatchersRemove": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "List<String>", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The watchers of the issue to remove" }, + "ParentIssueKey": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the parent issue" }, + "ChildIssueKey": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The id of the child issue" }, + "linkType": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of link" }, + "minutesSpent": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "int", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "defaultValue": "-1", "description": "The minutes spent" } + }, "properties": { "type": { "kind": "path", "displayName": "Type", "group": "common", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.jira.JiraType", "enum": [ "ADDCOMMENT", "ADDISSUE", "ATTACH", "DELETEISSUE", "NEWISSUES", "NEWCOMMENTS", "WATCHUPDATES", "UPDATEISSUE", "TRANSITIONISSUE", "WATCHERS", "ADDISSUELINK", "ADDWORKLOG", "FETCHISSUE", "FETCHCOMMENTS" ], "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Oper [...] "delay": { "kind": "parameter", "displayName": "Delay", "group": "common", "label": "", "required": false, "type": "integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "6000", "configurationClass": "org.apache.camel.component.jira.JiraConfiguration", "configurationField": "configuration", "description": "Time in milliseconds to elapse for the next poll." }, diff --git a/components/camel-jira/src/main/docs/jira-component.adoc b/components/camel-jira/src/main/docs/jira-component.adoc index 40619da..cc063ef 100644 --- a/components/camel-jira/src/main/docs/jira-component.adoc +++ b/components/camel-jira/src/main/docs/jira-component.adoc @@ -79,6 +79,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 == Client Factory diff --git a/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraConstants.java b/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraConstants.java index 7f9ed14..b3c6f91 100644 --- a/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraConstants.java +++ b/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraConstants.java @@ -16,6 +16,8 @@ */ package org.apache.camel.component.jira; +import org.apache.camel.spi.Metadata; + public interface JiraConstants { String JIRA = "jira"; @@ -24,24 +26,43 @@ public interface JiraConstants { String JIRA_URL = "jiraUrl"; String PRIVATE_KEY = "privateKey"; String CONSUMER_KEY = "consumerKey"; + @Metadata(label = "producer", description = "The assignee's name of the issue", javaType = "String") String ISSUE_ASSIGNEE = "IssueAssignee"; + @Metadata(label = "producer", description = "The comments of the issue", javaType = "List<String>") String ISSUE_COMPONENTS = "IssueComponents"; String ISSUE_COMMENT = "IssueComment"; + @Metadata(label = "consumer", description = "The name of the updated field (i.e Status)", javaType = "String") String ISSUE_CHANGED = "IssueChanged"; + @Metadata(description = "The id of the issue", javaType = "String") String ISSUE_KEY = "IssueKey"; + @Metadata(label = "producer", description = "The priority's id of the issue", javaType = "Long") String ISSUE_PRIORITY_ID = "IssuePriorityId"; + @Metadata(label = "producer", description = "The priority's name of the issue", javaType = "String") String ISSUE_PRIORITY_NAME = "IssuePriorityName"; + @Metadata(label = "producer", description = "The project's id of the issue", javaType = "String") String ISSUE_PROJECT_KEY = "ProjectKey"; + @Metadata(label = "producer", description = "The summary of the issue", javaType = "String") String ISSUE_SUMMARY = "IssueSummary"; + @Metadata(label = "producer", description = "The transition id", javaType = "Integer") String ISSUE_TRANSITION_ID = "IssueTransitionId"; + @Metadata(label = "producer", description = "The type's id of the issue", javaType = "Long") String ISSUE_TYPE_ID = "IssueTypeId"; + @Metadata(label = "producer", description = "The type's name of the issue", javaType = "String") String ISSUE_TYPE_NAME = "IssueTypeName"; + @Metadata(label = "consumer", description = "The list of all issue keys that are watched in the time of update", + javaType = "String") String ISSUE_WATCHED_ISSUES = "IssueWatchedIssues"; + @Metadata(label = "producer", description = "The watchers of the issue to add", javaType = "List<String>") String ISSUE_WATCHERS_ADD = "IssueWatchersAdd"; + @Metadata(label = "producer", description = "The watchers of the issue to remove", javaType = "List<String>") String ISSUE_WATCHERS_REMOVE = "IssueWatchersRemove"; String JIRA_REST_CLIENT_FACTORY = "JiraRestClientFactory"; + @Metadata(label = "producer", description = "The id of the parent issue", javaType = "String") String PARENT_ISSUE_KEY = "ParentIssueKey"; + @Metadata(label = "producer", description = "The id of the child issue", javaType = "String") String CHILD_ISSUE_KEY = "ChildIssueKey"; + @Metadata(label = "producer", description = "The type of link", javaType = "String") String LINK_TYPE = "linkType"; + @Metadata(label = "producer", description = "The minutes spent", javaType = "int", defaultValue = "-1") String MINUTES_SPENT = "minutesSpent"; } diff --git a/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraEndpoint.java b/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraEndpoint.java index b68d90a..a2935a6 100644 --- a/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraEndpoint.java +++ b/components/camel-jira/src/main/java/org/apache/camel/component/jira/JiraEndpoint.java @@ -74,7 +74,7 @@ import static org.apache.camel.component.jira.JiraConstants.JIRA_REST_CLIENT_FAC * publicly accessible where a webhook would fail */ @UriEndpoint(firstVersion = "3.0", scheme = "jira", title = "Jira", syntax = "jira:type", - category = { Category.API, Category.REPORTING }) + category = { Category.API, Category.REPORTING }, headersClass = JiraConstants.class) public class JiraEndpoint extends DefaultEndpoint { private static final transient Logger LOG = LoggerFactory.getLogger(JiraEndpoint.class);
