davsclaus commented on issue #3117:
URL: 
https://github.com/apache/camel-kamelets/issues/3117#issuecomment-6974442471

   **Decision:** the Kamelets are being overhauled anyway, and the old ones 
were buggy and little used. So backwards compatibility counts for less here. 
Kamelets get a `default` data type, even though Camel then runs its transformer 
on every message. Each PR says which bodies change.
   
   ### How
   
   - **Defaults:** each Kamelet gets the default that matches the body it 
really gives or takes, checked by running it. The transformer then mostly 
changes only the Java type and the `Content-Type` header, not the content.
     - **Sources (`out`):** `binary` (`application-octet-stream`) for a payload 
of bytes, such as files, objects and messages. `json` (`application-json`) for 
a source that gives JSON, such as rows, documents and API results. `text` 
(`text-plain`) for text.
     - **Sinks (`in`):** the body the sink sends.
     - **Actions (`in` and `out`):** only where the body is fixed.
   - **Traps:**
     - `application-json` turns text that is not JSON into a JSON string 
(`ORD-1` becomes `"ORD-1"`). So an action whose output can be a plain value, 
such as `extract-field-action` with `trimField` (#3088), must not get a `json` 
default on `out`.
     - `application-octet-stream` fails on a null body and on a number.
   - **Batches:** one per family, as for the documentation. Each batch runs the 
Citrus tests of its Kamelets, and records the body before and after with `camel 
run`.
   - **Order:** after #3186, so the catalog builds against Camel 4.24, whose 
catalog lists the body types of the transformers (CAMEL-25928).
   
   _Claude Code on behalf of Claus Ibsen_
   


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