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 2026/03/11 17:18:58 UTC

(camel) branch main updated: CAMEL-23174 - Kamelet: transformer in aws-ddb-sink is not executed (#21934)

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 6c39ea6aba48 CAMEL-23174 - Kamelet: transformer in aws-ddb-sink is not executed (#21934)
6c39ea6aba48 is described below

commit 6c39ea6aba484e41903bb0623aa577f137d96731
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 11 18:18:51 2026 +0100

    CAMEL-23174 - Kamelet: transformer in aws-ddb-sink is not executed (#21934)
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../apache/camel/dsl/yaml/KameletLoaderTest.groovy | 118 +++++++++++++++++++++
 1 file changed, 118 insertions(+)

diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/KameletLoaderTest.groovy b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/KameletLoaderTest.groovy
index aa081e1f6e0d..b341c62d37f2 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/KameletLoaderTest.groovy
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/test/groovy/org/apache/camel/dsl/yaml/KameletLoaderTest.groovy
@@ -333,6 +333,124 @@ class KameletLoaderTest extends YamlTestSupport {
             MockEndpoint.assertIsSatisfied(context)
     }
 
+    def "kamelet with dataTypes input"() {
+        when:
+            loadKamelets('''
+                apiVersion: camel.apache.org/v1
+                kind: Kamelet
+                metadata:
+                  name: my-sink
+                spec:
+                  definition:
+                    title: "My Sink"
+                    required:
+                      - table
+                    properties:
+                      table:
+                        title: Table
+                        type: string
+                  dataTypes:
+                    in:
+                      default: json
+                      types:
+                        json:
+                          scheme: my-component
+                          format: application-json
+                  template:
+                    from:
+                      uri: "kamelet:source"
+                      steps:
+                        - to: "log:test"
+            ''')
+        then:
+            context.routeTemplateDefinitions.size() == 1
+
+            with (context.routeTemplateDefinitions[0]) {
+                id == 'my-sink'
+
+                with(route) {
+                    inputType.urn == 'my-component:application-json'
+                    outputType == null
+                }
+            }
+    }
+
+    def "kamelet with dataTypes input and output"() {
+        when:
+            loadKamelets('''
+                apiVersion: camel.apache.org/v1
+                kind: Kamelet
+                metadata:
+                  name: my-action
+                spec:
+                  definition:
+                    title: "My Action"
+                  dataTypes:
+                    in:
+                      default: json
+                      types:
+                        json:
+                          scheme: my-component
+                          format: application-json
+                    out:
+                      default: binary
+                      types:
+                        binary:
+                          format: application-octet-stream
+                  template:
+                    from:
+                      uri: "kamelet:source"
+                      steps:
+                        - to: "log:test"
+            ''')
+        then:
+            context.routeTemplateDefinitions.size() == 1
+
+            with (context.routeTemplateDefinitions[0]) {
+                id == 'my-action'
+
+                with(route) {
+                    inputType.urn == 'my-component:application-json'
+                    outputType.urn == 'application-octet-stream'
+                }
+            }
+    }
+
+    def "kamelet with dataTypes format only"() {
+        when:
+            loadKamelets('''
+                apiVersion: camel.apache.org/v1
+                kind: Kamelet
+                metadata:
+                  name: my-source
+                spec:
+                  definition:
+                    title: "My Source"
+                  dataTypes:
+                    out:
+                      default: binary
+                      types:
+                        binary:
+                          format: application-octet-stream
+                  template:
+                    from:
+                      uri: "kamelet:source"
+                      steps:
+                        - to: "log:test"
+            ''')
+        then:
+            context.routeTemplateDefinitions.size() == 1
+
+            with (context.routeTemplateDefinitions[0]) {
+                id == 'my-source'
+
+                with(route) {
+                    inputType == null
+                    outputType.urn == 'application-octet-stream'
+                }
+            }
+    }
+
     def "kamelet with bean constructors"() {
         when:
         loadKamelets('''