This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit ecabb7c2ef147bd56afd48691460e2e8448e3caa Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sun Dec 18 14:57:43 2022 +0100 Add missing descriptions to some options in route for XML DSL --- .../org/apache/camel/catalog/models/route.json | 5 +++- .../apache/camel/catalog/schemas/camel-spring.xsd | 34 +++++++++++++++++++--- .../resources/org/apache/camel/model/route.json | 5 +++- .../org/apache/camel/model/RouteDefinition.java | 2 +- .../camel/maven/packaging/SchemaGeneratorMojo.java | 22 ++++++++++++-- 5 files changed, 59 insertions(+), 9 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json index ad97683f253..ef4583cf14a 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/route.json @@ -13,9 +13,12 @@ }, "properties": { "group": { "kind": "attribute", "displayName": "Group", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The group that this route belongs to; could be the name of the RouteBuilder class or be explicitly configured in the XML. May be null." }, + "nodePrefixId": { "kind": "attribute", "displayName": "Node Prefix Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a prefix to use for all node ids (not route id)." }, + "routeConfigurationId": { "kind": "attribute", "displayName": "Route Configuration Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The route configuration id or pattern this route should use for configuration. Multiple id\/pattern can be separated by comma." }, + "precondition": { "kind": "attribute", "displayName": "Precondition", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The predicate of the precondition in simple language to evaluate in order to determine if this route should be included or not." }, "streamCache": { "kind": "attribute", "displayName": "Stream Cache", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Whether stream caching is enabled on this route." }, "trace": { "kind": "attribute", "displayName": "Trace", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Whether tracing is enabled on this route." }, - "messageHistory": { "kind": "attribute", "displayName": "Message History", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "true", "description": "Whether message history is enabled on this route." }, + "messageHistory": { "kind": "attribute", "displayName": "Message History", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Whether message history is enabled on this route." }, "logMask": { "kind": "attribute", "displayName": "Log Mask", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Whether security mask for Logging is enabled on this route." }, "delayer": { "kind": "attribute", "displayName": "Delayer", "required": false, "type": "duration", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Whether to slow down processing messages by a given delay in msec." }, "autoStartup": { "kind": "attribute", "displayName": "Auto Startup", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "true", "description": "Whether to auto start this route" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd index 0f56ca75b83..9f7700b0877 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd @@ -16179,19 +16179,45 @@ Whether security mask for Logging is enabled on this route. Default value: false <xs:annotation> <xs:documentation xml:lang="en"> <![CDATA[ -Whether message history is enabled on this route. Default value: true +Whether message history is enabled on this route. ]]> </xs:documentation> </xs:annotation> </xs:attribute> - <xs:attribute name="nodePrefixId" type="xs:string"/> + <xs:attribute name="nodePrefixId" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"> + <![CDATA[ +Sets a prefix to use for all node ids (not route id). + ]]> + </xs:documentation> + </xs:annotation> + </xs:attribute> - <xs:attribute name="precondition" type="xs:string"/> + <xs:attribute name="precondition" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"> + <![CDATA[ +The predicate of the precondition in simple language to evaluate in order to +determine if this route should be included or not. + ]]> + </xs:documentation> + </xs:annotation> + </xs:attribute> <xs:attribute name="rest" type="xs:boolean"/> - <xs:attribute name="routeConfigurationId" type="xs:string"/> + <xs:attribute name="routeConfigurationId" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"> + <![CDATA[ +The route configuration id or pattern this route should use for configuration. +Multiple id/pattern can be separated by comma. + ]]> + </xs:documentation> + </xs:annotation> + </xs:attribute> <xs:attribute name="routePolicyRef" type="xs:string"> <xs:annotation> diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/route.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/route.json index ad97683f253..ef4583cf14a 100644 --- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/route.json +++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/route.json @@ -13,9 +13,12 @@ }, "properties": { "group": { "kind": "attribute", "displayName": "Group", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The group that this route belongs to; could be the name of the RouteBuilder class or be explicitly configured in the XML. May be null." }, + "nodePrefixId": { "kind": "attribute", "displayName": "Node Prefix Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a prefix to use for all node ids (not route id)." }, + "routeConfigurationId": { "kind": "attribute", "displayName": "Route Configuration Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The route configuration id or pattern this route should use for configuration. Multiple id\/pattern can be separated by comma." }, + "precondition": { "kind": "attribute", "displayName": "Precondition", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The predicate of the precondition in simple language to evaluate in order to determine if this route should be included or not." }, "streamCache": { "kind": "attribute", "displayName": "Stream Cache", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Whether stream caching is enabled on this route." }, "trace": { "kind": "attribute", "displayName": "Trace", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Whether tracing is enabled on this route." }, - "messageHistory": { "kind": "attribute", "displayName": "Message History", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "true", "description": "Whether message history is enabled on this route." }, + "messageHistory": { "kind": "attribute", "displayName": "Message History", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Whether message history is enabled on this route." }, "logMask": { "kind": "attribute", "displayName": "Log Mask", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Whether security mask for Logging is enabled on this route." }, "delayer": { "kind": "attribute", "displayName": "Delayer", "required": false, "type": "duration", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Whether to slow down processing messages by a given delay in msec." }, "autoStartup": { "kind": "attribute", "displayName": "Auto Startup", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "true", "description": "Whether to auto start this route" }, diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java index 534ae072df8..ea92bc4611b 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/RouteDefinition.java @@ -927,7 +927,7 @@ public class RouteDefinition extends OutputDefinition<RouteDefinition> * Whether message history is enabled on this route. */ @XmlAttribute - @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true") + @Metadata(label = "advanced", javaType = "java.lang.Boolean") public void setMessageHistory(String messageHistory) { this.messageHistory = messageHistory; } diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java index 8707c55bf34..c8300353a7d 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SchemaGeneratorMojo.java @@ -644,7 +644,25 @@ public class SchemaGeneratorMojo extends AbstractGeneratorMojo { false, null, null, false, false); eipOptions.add(ep); - // group + // nodePrefixId + docComment = findJavaDoc(null, "nodePrefixId", null, classElement, true); + ep = createOption("nodePrefixId", "Node Prefix Id", "attribute", "java.lang.String", false, "", "", docComment, false, null, + false, null, null, false, false); + eipOptions.add(ep); + + // routeConfigurationId + docComment = findJavaDoc(null, "routeConfigurationId", null, classElement, true); + ep = createOption("routeConfigurationId", "Route Configuration Id", "attribute", "java.lang.String", false, "", "", docComment, false, null, + false, null, null, false, false); + eipOptions.add(ep); + + // precondition + docComment = findJavaDoc(null, "precondition", null, classElement, true); + ep = createOption("precondition", "Precondition", "attribute", "java.lang.String", false, "", "", docComment, false, + null, false, null, null, false, false); + eipOptions.add(ep); + + // stream cache docComment = findJavaDoc(null, "streamCache", null, classElement, true); ep = createOption("streamCache", "Stream Cache", "attribute", "java.lang.String", false, "", "", docComment, false, null, @@ -660,7 +678,7 @@ public class SchemaGeneratorMojo extends AbstractGeneratorMojo { // message history docComment = findJavaDoc(null, "messageHistory", null, classElement, true); - ep = createOption("messageHistory", "Message History", "attribute", "java.lang.String", false, "true", "", docComment, + ep = createOption("messageHistory", "Message History", "attribute", "java.lang.String", false, "", "", docComment, false, null, false, null, null, false, false); eipOptions.add(ep);