oscerd commented on PR #21933:
URL: https://github.com/apache/camel/pull/21933#issuecomment-4038916900

   On the transformDataType() question:                                         
                                                                                
                                                                      
   
   The omission is intentional. In Pipes, the Pipe loader adds 
transformDataType() steps programmatically because the Pipe YAML doesn't 
contain explicit transformation steps, the loader builds them from the 
source/sink dataTypes.
   In kamelets, the template itself already contains explicit transformDataType 
steps (e.g., transformDataType: toType: "aws2-ddb:application-json"). Adding 
transformDataType() calls in KameletRoutesBuilderLoader would duplicate the
    transformation.
   
   The /spec/dataTypes section in kamelets serves as a contract declaration — 
it tells the framework what types the kamelet accepts/produces. Setting 
inputType/outputType establishes this contract so that RouteReifier installs
   ContractAdvice and enables useDataType globally. The actual transformation 
logic lives in the kamelet's template steps.
   
     On test coverage:
   
     Three tests have been added to KameletLoaderTest.groovy:
     - "kamelet with dataTypes input" - sink kamelet with only in dataType 
(scheme + format)
     - "kamelet with dataTypes input and output" - action kamelet with both in 
and out
     - "kamelet with dataTypes format only" - source kamelet with only out 
dataType (format without scheme)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to