davsclaus opened a new pull request, #3158:
URL: https://github.com/apache/camel-kamelets/pull/3158
_Claude Code on behalf of Claus Ibsen_
Template fixes for bugs found while documenting the Kamelets (#3141–#3155).
Each was reproduced first, then fixed and verified on Camel 4.23.0 and
4.24.0-SNAPSHOT. None of them reverts earlier work: each bug dates from when
the option or template was written.
## Fixes
| Kamelet | Bug | Fix | Verified |
|---|---|---|---|
| `scp-sink` | Setting `knownHostsUri` or `privateKeyPassphrase` failed the
start with `Unknown parameters`. The scp options are `knownHostsFile` and
`privateKeyFilePassphrase`. | Mapped to them; the passphrase in `RAW()`. | An
OpenSSH container, with a key with a passphrase and a known_hosts file.
Host-key checking rejects an unknown host. The existing password setup still
works. |
| `google-mail-source` | Did not start without `labels`, which is optional.
| `{{?labels}}` | Started without and with `labels`, up to the Google login. |
| `mail-sink` | Did not start without `from`, `to` and `subject`, which are
optional because the `ce-*` headers can give them. | `{{?…}}` | GreenMail. A
mail with only the headers set, and one with only the options set, both arrive
correctly. |
| `header-matches-filter-action` `headerName`, `jira-source` `jql`,
`salesforce-create-sink` `sObjectName`, `fhir-sink` `apiName` | The route fails
to start without them, yet they were not `required`. | Added to `required`. |
Each now stops with a clear "mandatory parameters" error. |
| `aws-bedrock-agent-sink` `dataSourceId` | It started without it, then
failed every message. | Added to `required`. | — |
| `pdf-action` | The default font `Helvetica` failed every message: `No enum
constant ...FontName.Helvetica`. | `default: HELVETICA` | A PDF is produced,
with the default and with `COURIER_BOLD`. |
| `xj-template-action` | Failed at start with `include href is empty`: the
xj component takes the stylesheet from its path, not from `resourceUri`. |
`xj:{{template}}?transformDirection=…` | XML2JSON with `file:///…`,
`classpath:` and `classpath://` stylesheets. |
| `rest-openapi-sink` | `clientRequestValidation` is a consumer option and
had no effect. | Passed as the producer's `requestValidationEnabled`; the
Kamelet option keeps its name. | An invalid request is now rejected and not
sent. |
| `mariadb-source`, `sqlserver-source` | Declared their output data type
under `in`. | Moved to `out`. | — |
| `google-storage-source` | Named the `aws2-s3:application-cloudevents` data
type. | `google-storage:application-cloudevents` | Checked with
`data-type-action`. |
More on three of these:
- **`scp-sink` `pattern`:** it now accepts a path or a `classpath:`
resource, the forms the scp component reads. The old pattern allowed only
`file://`, `http(s)://` and similar URIs. They all failed (`file:file:///…`),
so no working configuration is affected.
- **`pdf-action` and old font names:** names like `Courier-Bold` still fail,
as before. Accepting them would need a change in camel-pdf.
- **`xj-template-action`:** with the fix, its description is rewritten to
the standard of #3140. It was held back from #3143 because the Kamelet did not
work.
## Not changed
**`solr-source`** declares its data type under `in`, but `out:
application/json` would be wrong too. When it was re-added in a3dc315bc, the
`marshal: json` step of the old version was dropped, and it now emits a Java
object (`SimpleOrderedMap`). Restoring the step changes what it emits, so it is
left for a decision.
## Behaviour changes on upgrade
- **New required options:**
- for the four Kamelets that could not start without them, the only change
is a clearer error;
- `aws-bedrock-agent-sink` without `dataSourceId` now fails at start
instead of on every message.
- **`rest-openapi-sink` with `clientRequestValidation=true`** now rejects
invalid requests.
- **`scp-sink` `knownHostsUri`** now rejects `file://` and `http(s)://`
values, which never worked.
Some option descriptions on `main` (`pdf-action` `font`, `scp-sink`
`knownHostsUri`, `rest-openapi-sink` `clientRequestValidation`) are replaced in
the documentation PRs #3143, #3149 and #3154. I will align those with these
fixes, whichever merges second.
`./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]