You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/01/24 11:57:34 UTC
[camel] branch main updated: CAMEL-17281: camel-yaml-dsl - Error handlers have options not in the json model schema
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
The following commit(s) were added to refs/heads/main by this push:
new a166766 CAMEL-17281: camel-yaml-dsl - Error handlers have options not in the json model schema
a166766 is described below
commit a166766f7ebdc61b8d120af8e6f8f8dc0b24afdd
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Jan 24 12:56:28 2022 +0100
CAMEL-17281: camel-yaml-dsl - Error handlers have options not in the json model schema
---
.../dsl/yaml/deserializers/ModelDeserializers.java | 17 +++++++++-
.../dsl/yaml/GenerateYamlDeserializersMojo.java | 1 +
.../src/generated/resources/camel-yaml-dsl.json | 36 ++++++++++++++++++++++
.../src/generated/resources/camelYamlDsl.json | 36 ++++++++++++++++++++++
.../camel-yaml-dsl/src/main/docs/yaml-dsl.adoc | 4 +--
5 files changed, 91 insertions(+), 3 deletions(-)
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index 54e9d52..a4b4fd2 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -3685,6 +3685,12 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
properties = {
@YamlProperty(name = "async-delayed-redelivery", type = "boolean"),
@YamlProperty(name = "dead-letter-handle-new-exception", type = "boolean"),
+ @YamlProperty(name = "dead-letter-uri", type = "string"),
+ @YamlProperty(name = "executor-service-ref", type = "string"),
+ @YamlProperty(name = "on-exception-occurred-ref", type = "string"),
+ @YamlProperty(name = "on-prepare-failure-ref", type = "string"),
+ @YamlProperty(name = "on-redelivery-ref", type = "string"),
+ @YamlProperty(name = "retry-while-ref", type = "string"),
@YamlProperty(name = "use-original-body", type = "boolean"),
@YamlProperty(name = "use-original-message", type = "boolean")
}
@@ -3772,6 +3778,12 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
properties = {
@YamlProperty(name = "async-delayed-redelivery", type = "boolean"),
@YamlProperty(name = "dead-letter-handle-new-exception", type = "boolean"),
+ @YamlProperty(name = "dead-letter-uri", type = "string"),
+ @YamlProperty(name = "executor-service-ref", type = "string"),
+ @YamlProperty(name = "on-exception-occurred-ref", type = "string"),
+ @YamlProperty(name = "on-prepare-failure-ref", type = "string"),
+ @YamlProperty(name = "on-redelivery-ref", type = "string"),
+ @YamlProperty(name = "retry-while-ref", type = "string"),
@YamlProperty(name = "use-original-body", type = "boolean"),
@YamlProperty(name = "use-original-message", type = "boolean")
}
@@ -4544,7 +4556,10 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
inline = true,
types = org.apache.camel.builder.ErrorHandlerBuilderRef.class,
order = org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1,
- properties = @YamlProperty(name = "support-transacted", type = "boolean")
+ properties = {
+ @YamlProperty(name = "ref", type = "string"),
+ @YamlProperty(name = "support-transacted", type = "boolean")
+ }
)
public static class ErrorHandlerBuilderRefDeserializer extends YamlDeserializerBase<ErrorHandlerBuilderRef> {
public ErrorHandlerBuilderRefDeserializer() {
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java
index e86f147..97a0626 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-maven-plugin/src/main/java/org/apache/camel/maven/dsl/yaml/GenerateYamlDeserializersMojo.java
@@ -1115,6 +1115,7 @@ public class GenerateYamlDeserializersMojo extends GenerateYamlSupportMojo {
cb.addStatement("String val = asText(node)");
cb.addStatement("target.$L(val)", method.name());
cb.addStatement("break");
+ annotations.add(yamlProperty(name, "string"));
break;
case "java.lang.Class":
cb.addStatement("java.lang.Class<?> val = asClass(node)");
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
index b140423..bc05c9a 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json
@@ -307,6 +307,24 @@
"dead-letter-handle-new-exception" : {
"type" : "boolean"
},
+ "dead-letter-uri" : {
+ "type" : "string"
+ },
+ "executor-service-ref" : {
+ "type" : "string"
+ },
+ "on-exception-occurred-ref" : {
+ "type" : "string"
+ },
+ "on-prepare-failure-ref" : {
+ "type" : "string"
+ },
+ "on-redelivery-ref" : {
+ "type" : "string"
+ },
+ "retry-while-ref" : {
+ "type" : "string"
+ },
"use-original-body" : {
"type" : "boolean"
},
@@ -325,6 +343,24 @@
"dead-letter-handle-new-exception" : {
"type" : "boolean"
},
+ "dead-letter-uri" : {
+ "type" : "string"
+ },
+ "executor-service-ref" : {
+ "type" : "string"
+ },
+ "on-exception-occurred-ref" : {
+ "type" : "string"
+ },
+ "on-prepare-failure-ref" : {
+ "type" : "string"
+ },
+ "on-redelivery-ref" : {
+ "type" : "string"
+ },
+ "retry-while-ref" : {
+ "type" : "string"
+ },
"use-original-body" : {
"type" : "boolean"
},
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
index 0e0be74..48c3c01 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camelYamlDsl.json
@@ -214,6 +214,24 @@
"deadLetterHandleNewException" : {
"type" : "boolean"
},
+ "deadLetterUri" : {
+ "type" : "string"
+ },
+ "executorServiceRef" : {
+ "type" : "string"
+ },
+ "onExceptionOccurredRef" : {
+ "type" : "string"
+ },
+ "onPrepareFailureRef" : {
+ "type" : "string"
+ },
+ "onRedeliveryRef" : {
+ "type" : "string"
+ },
+ "retryWhileRef" : {
+ "type" : "string"
+ },
"useOriginalBody" : {
"type" : "boolean"
},
@@ -232,6 +250,24 @@
"deadLetterHandleNewException" : {
"type" : "boolean"
},
+ "deadLetterUri" : {
+ "type" : "string"
+ },
+ "executorServiceRef" : {
+ "type" : "string"
+ },
+ "onExceptionOccurredRef" : {
+ "type" : "string"
+ },
+ "onPrepareFailureRef" : {
+ "type" : "string"
+ },
+ "onRedeliveryRef" : {
+ "type" : "string"
+ },
+ "retryWhileRef" : {
+ "type" : "string"
+ },
"useOriginalBody" : {
"type" : "boolean"
},
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/docs/yaml-dsl.adoc b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/docs/yaml-dsl.adoc
index a884c5e..b9d641e 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/docs/yaml-dsl.adoc
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/docs/yaml-dsl.adoc
@@ -1,5 +1,5 @@
-= Yaml Dsl Component
-:doctitle: Yaml Dsl
+= YAML DSL Component
+:doctitle: YAML DSL
:shortname: yaml-dsl
:artifactid: camel-yaml-dsl
:description: Camel DSL with YAML