This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch 23174 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 053cf67ddece7f965a9e0554b4692f1e3ba91ab8 Author: Andrea Cosentino <[email protected]> AuthorDate: Wed Mar 11 13:33:35 2026 +0100 CAMEL-23174 - Kamelet: transformer in aws-ddb-sink is not executed Signed-off-by: Andrea Cosentino <[email protected]> --- .../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('''
