davsclaus opened a new pull request, #3143:
URL: https://github.com/apache/camel-kamelets/pull/3143

   _Claude Code on behalf of Claus Ibsen_
   
   A batch of Kamelets rewritten to the documentation standard proposed in 
#3140, `docs/modules/ROOT/pages/documenting.adoc`, like #3141 and #3142.
   
   This batch has 10 Kamelets:
   - the template actions `freemarker-template-action`, 
`velocity-template-action`, `mvel-template-action` and `string-template-action`;
   - `jolt-transformation-action`, `jslt-action` and `xj-identity-action`;
   - `crypto-encrypt-action` and `crypto-decrypt-action`;
   - `pdf-action`.
   
   **Every one was run**, on Camel 4.24.0-SNAPSHOT and on 4.23.0.
   
   ## Facts that were missing before
   
   - **The template languages:** each description now gives the syntax for the 
body and a header, and what a missing value does.
   
     | Language | Body / header | A missing value |
     |---|---|---|
     | FreeMarker | `${body}`, `${headers.name}` | fails the message; `${x!""}` 
gives a default |
     | Velocity | `${body}`, `${headers.name}` | stays as written; `$!{x}` 
gives nothing |
     | MVEL | `@{body}`, `@{headers.name}` | fails the message |
     | StringTemplate | `<body>`, `<headers.name>` | an empty string |
   
   - **`jolt-transformation-action`:** gives a Map (or List), not JSON text; 
put `json-serialize-action` after it for text.
   - **`jslt-action`:** takes JSON text, bytes or a stream, and a Map fails.
   - **`xj-identity-action`:** the fixed mapping is shown both ways, with an 
example.
   - **`crypto-*`:**
     - the `algorithm` values that work, and the key lengths (AES: 16, 24 or 32 
characters);
     - the output is bytes, so encode it to send it as text;
     - a wrong key or changed data fails with "Message authentication failed".
   - **`pdf-action`:**
     - the output is the PDF as bytes;
     - long lines are not wrapped;
     - the font size is in points;
     - the component's `pageSize` values are added as an `enum`.
   
   ## Left out, and found on the way
   
   - **`chunk-template-action` and `xj-template-action` are not in this PR,** 
because their templates do not work as written:
     - `chunk-template-action` passes `resourceUri=base64:{{template}}`, but 
`base64:` is not a resource scheme Camel knows. The body silently becomes 
`[chtml template 'base64:…' not found]`.
     - `xj-template-action` fails at start with `include href is empty`. The 
`xj` component takes the stylesheet from its path, not from `resourceUri`.
   
     They will be described together with their fixes.
   - **`pdf-action`'s default `font` of `Helvetica` fails every message.** The 
accepted names are `HELVETICA`, `COURIER_BOLD`, `TIMES_ROMAN` and so on. The 
description says so for now. Fixing the default, and adding the font `enum`, is 
a template change for its own PR. `fontSize` is also typed `string`, with 
default `14.0`.
   - **`jolt-transformation-action` on Camel 4.23 and older:** a JSON text, 
bytes or stream body gives an empty body with no error. A Map works on every 
version.
   
   ## Notes for review
   
   - No template, type, default or required list was changed.
   - This PR is based on `main`; if #3140 merges first, I will rebase it and 
regenerate the index.
   
   `./mvnw clean install` from the root passes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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