smongiar opened a new pull request, #23780:
URL: https://github.com/apache/camel/pull/23780

   ## Summary
   
   - Normalize transformer names before catalog lookup in 
`DependencyDownloaderTransformerResolver`
   - Transformer names use colon-separated format (`aws2-ddb:application-json`) 
but the catalog stores them in dash-separated format 
(`aws2-ddb-application-json`)
   - The `normalize(key)` method from `TransformerResolver` interface already 
handles this conversion via `StringHelper.sanitize()` — it just wasn't being 
called before the catalog lookup
   - Also normalize the name for the "did you mean" suggestion to produce 
accurate suggestions
   
   ## Reproducer
   
   ```bash
   # Create a route using a kamelet with data type transformers
   cat > DdbSinkRoute.java << 'ROUTE'
   import org.apache.camel.builder.RouteBuilder;
   public class DdbSinkRoute extends RouteBuilder {
       @Override
       public void configure() {
           from("timer:tick?period=5000")
               .setBody(constant("{\"key\": \"value\"}"))
               .to("kamelet:aws-ddb-sink");
       }
   }
   ROUTE
   
   # This fails with: Cannot find transformer with name: 
aws2-ddb:application-json.
   # Did you mean: aws2-ddb-application-json
   camel export --runtime=spring-boot --gav=com.example:test:1.0.0 --dir=./app 
DdbSinkRoute.java
   ```
   
   ## Test plan
   
   - [x] Added `catalogLookupShouldNormalizeColonSeparatedNames()` test 
verifying catalog lookup works with colon-separated names after normalization
   - [x] Existing `stubTransformerShouldHaveNameSet()` test still passes


-- 
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