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

   JIRA: https://issues.apache.org/jira/browse/CAMEL-26294
   
   ## What
   
   A sweep of the doc examples through `camel validate source` reported options 
that work when the route runs. I checked each with `camel run`. One case was 
the validator's fault, and one was the docs':
   
   **1. Options a Kamelet forwards with `advancedOptions` (validator).** With 
`advancedOptions` set, the options of a `kamelet:` endpoint that are not 
properties of the Kamelet go to the endpoint the Kamelet wraps, such as 
`maxConnections` of `aws2-s3` for `aws-s3-source`. `KameletChecks` reported 
them as unknown properties of the Kamelet.
   
   It now takes the setting as the runtime does:
   - from the endpoint when the endpoint sets it;
   - otherwise from `camel.component.kamelet.advanced-options` in the 
`application.properties` of the project;
   - a placeholder means it is not known.
   
   When options are forwarded, they are not reported.
   
   **2. Kamelet properties as `camel.component.kamelet.<kamelet>.<property>` 
(docs).** The JIRA first took this for a validator false positive. Running it 
shows the validator is right: Camel fails at startup with `Cannot find getter 
method: timerSource on bean: class 
org.apache.camel.component.kamelet.KameletComponent when binding property: 
timerSource.message`. The Kamelet properties are 
`camel.kamelet.<kamelet>.<property>`, which works, and which the validator 
already reads from `application.properties` for the required properties. 
`kubernetes-secrets-component.adoc` (and its catalog copy) and 
`property-placeholder-functions.adoc` now use that form.
   
   **3. Language options** (`camel.language.<name>.<option>`) are split out to 
[CAMEL-26296](https://issues.apache.org/jira/browse/CAMEL-26296). The catalog 
has the options of the expression of a language, not those of the language bean 
that camel-main binds, so it needs a catalog change.
   
   ## Tests
   
   - **`KameletChecksTest.theOptionsAdvancedOptionsForwards`:**
     - on the endpoint (`parameters` and the uri query);
     - on the component in `application.properties`, where the endpoint setting 
wins;
     - without the setting, the options are still reported.
   - **Local full check:** the catalog, the validator and camel-jbang-core 
(2429) tests.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_0128ThHB3iQdrvSRLVBGRrdP
   


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