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

   _Claude Code on behalf of Claus Ibsen_
   
   The first batch of Kamelets rewritten to the documentation standard proposed 
in #3140. #3140 has the guide, `docs/modules/ROOT/pages/documenting.adoc`, and 
nine example Kamelets. Each description now has:
   - a one-sentence summary as its first paragraph (what a list of the Kamelets 
shows);
   - then `Use it to`, `Input:`, `Output:` and `Good to know:` paragraphs;
   - options that give the format, the unit and an example.
   
   This batch is the 21 Kamelets that run without any outside system. **Every 
one was run** with `camel run` to check what it says. The JSON ones were also 
run on Camel 4.22.2 and 4.23.0.
   
   | Kamelets | Facts that were missing or wrong before |
   |---|---|
   | `simple-filter-action` | It **drops** the messages for which the condition 
is true: the opposite of the other filter actions. This is now said plainly. |
   | `has-header-filter-action`, `header-matches-filter-action` | 
`header-matches` said it filters on "the Kafka topic name". It matches any 
header, against the whole value, case-sensitive. A message without the header 
is dropped. |
   | `drop-header-action`, `drop-headers-action` | Names are not 
case-sensitive. The pattern order is exact name, then `*` wildcard, then regex. 
|
   | `insert-header-action` | The value is Simple language (`${body}`, 
`${header.x}`), and replaces an existing header. |
   | `delay-action`, `throttle-action` | Messages over the throttle limit wait; 
they are not dropped. |
   | `counter-source` | The body is an Integer, not text, although 
`Content-Type` is `text/plain`. There is no step option, which the old 
description claimed. |
   | `cron-source` | Quartz expressions, in local time. The old example `0/3 10 
* * * ?` runs during minute 10 of every hour, not "during the 10th hour". |
   | `dns-dig-action`, `dns-ip-action` | They read different headers: `dns-ip` 
reads `domain`/`ce-domain`, the others read `domain-name`. `dns-ip` returns one 
address. An unknown name fails in `dns-ip` but not in `dns-dig` (status 
`NXDOMAIN`). |
   | `log-action`, `log-sink` | By default they log the body and its type, not 
the headers. All 13 options are rewritten. |
   | `earthquake-source` | It selects by *updated* time, so an earthquake can 
come again when USGS updates it. `lookAhead` looks back, so it is now titled 
"Minutes to Look Back". |
   | `wttrin-source` | Its partial page claimed API keys; the service needs 
none. |
   | `json-*`, `jsonata-action` | What kind of body goes in and comes out: 
text, bytes, a `JsonNode` or a Map. For example, a Map body fails in 
`json-schema-validator-action`. |
   
   The partial pages of `counter-source`, `cron-source`, `earthquake-source` 
and `wttrin-source` are corrected where they contradicted the Kamelet.
   
   ## Found on the way, not changed here
   
   These need template changes, which belong in their own PRs:
   - **`json-deserialize-action` fails on Camel 4.24** with `Cannot construct 
instance of com.fasterxml.jackson.databind.JsonNode`. In 4.24 the `json` data 
format moved to Jackson 3. It works on 4.22 and 4.23.
   - **`jsonata-action` on 4.23 and older:**
     - a JSON text body is seen as one string, and the expression silently 
returns `{}`;
     - a bytes or stream body fails.
     - 4.24 parses all three. The description tells users to parse the body 
first.
   - **`header-matches-filter-action`** fails to start without `headerName`, 
but `headerName` is not `required`.
   - **`throttle-action`** `timePeriod` is typed `string`, with default 
`"1000"`.
   
   ## Notes for review
   
   - No template, type, default or required list was changed. Only 
descriptions, titles, examples, partial pages, and `spec.dataTypes` `headers` 
blocks. The headers blocks have no `default`, so they change nothing at runtime.
   - `insert-header-action` and `simple-filter-action` are the first 
descriptions with `${...}` in them. Asciidoctor leaves an unknown `{body}` as 
it is, so it should render, but it's worth a look on the site.
   - The 200-character summary check is in #3140. Every summary here is under 
200 characters. This PR is based on `main`; if #3140 merges first, I will 
rebase this PR 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