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/12/13 11:37:23 UTC

[camel] 03/07: CAMEL-18748: camel-yaml-dsl - error-handler should be aligned to camel-core-model to be consistent.

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 b69371587fef4688b0e307a313b49ff2ac4a4944
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Dec 13 12:00:44 2022 +0100

    CAMEL-18748: camel-yaml-dsl - error-handler should be aligned to camel-core-model to be consistent.
---
 .../org/apache/camel/catalog/models.properties     |  1 -
 .../ROOT/pages/camel-3x-upgrade-guide-3_20.adoc    |  8 ++++++++
 .../generated/resources/schema/camel-yaml-dsl.json | 24 +++++++++++-----------
 .../generated/resources/schema/camelYamlDsl.json   | 24 +++++++++++-----------
 4 files changed, 32 insertions(+), 25 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
index 021211ec614..26b1ed52416 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
@@ -43,7 +43,6 @@ doTry
 dynamicRouter
 enrich
 errorHandler
-errorHandlerRef
 exchangeProperty
 expression
 failover
diff --git a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_20.adoc b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_20.adoc
index 97b71823006..f4024d180e8 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_20.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-3x-upgrade-guide-3_20.adoc
@@ -57,3 +57,11 @@ The log component now does not show MEP by default. You can turn this on by `sho
 
 There is a new option `unpackArray` that unpacks a single-element Json array, matched by a Jsonpath, into an object. This option is disabled by default (this behaviour was enabled by default in previous Camel versions). There is a new expression `jsonpathUnpack(String text, Class<?> resultType)` that makes use of this new option.
 
+=== camel-yaml-dsl
+
+The `error-handler` has been refactored to be aligned with `errorHandler` from the `camel-core-model` DSL, meaning
+that it is now the same, how error handlers are in other DSLs.
+
+- `none` is now called `no-error-handler`
+- `log` has been removed, as you can use `dead-letter-channel` with a log endpoint as the `dead-letter-uri`.
+- `ref` is now `ref-error-handler`.
\ No newline at end of file
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
index da2f97617d6..b467bb50431 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
@@ -6069,18 +6069,6 @@
           }
         }
       },
-      "org.apache.camel.model.errorhandler.ErrorHandlerRefDefinition" : {
-        "type" : "object",
-        "properties" : {
-          "id" : {
-            "type" : "string"
-          },
-          "ref" : {
-            "type" : "string"
-          }
-        },
-        "required" : [ "ref" ]
-      },
       "org.apache.camel.model.errorhandler.JtaTransactionErrorHandlerDefinition" : {
         "type" : "object",
         "properties" : {
@@ -6141,6 +6129,18 @@
           }
         }
       },
+      "org.apache.camel.model.errorhandler.RefErrorHandlerDefinition" : {
+        "type" : "object",
+        "properties" : {
+          "id" : {
+            "type" : "string"
+          },
+          "ref" : {
+            "type" : "string"
+          }
+        },
+        "required" : [ "ref" ]
+      },
       "org.apache.camel.model.errorhandler.SpringTransactionErrorHandlerDefinition" : {
         "type" : "object",
         "properties" : {
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index fea8158d6ed..a30cf7da4b7 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -5973,18 +5973,6 @@
           }
         }
       },
-      "org.apache.camel.model.errorhandler.ErrorHandlerRefDefinition" : {
-        "type" : "object",
-        "properties" : {
-          "id" : {
-            "type" : "string"
-          },
-          "ref" : {
-            "type" : "string"
-          }
-        },
-        "required" : [ "ref" ]
-      },
       "org.apache.camel.model.errorhandler.JtaTransactionErrorHandlerDefinition" : {
         "type" : "object",
         "properties" : {
@@ -6045,6 +6033,18 @@
           }
         }
       },
+      "org.apache.camel.model.errorhandler.RefErrorHandlerDefinition" : {
+        "type" : "object",
+        "properties" : {
+          "id" : {
+            "type" : "string"
+          },
+          "ref" : {
+            "type" : "string"
+          }
+        },
+        "required" : [ "ref" ]
+      },
       "org.apache.camel.model.errorhandler.SpringTransactionErrorHandlerDefinition" : {
         "type" : "object",
         "properties" : {