[ 
https://issues.apache.org/jira/browse/CAMEL-26294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131800#comment-18131800
 ] 

Claus Ibsen commented on CAMEL-26294:
-------------------------------------

A correction of the second point, after running both forms with camel run: 
camel.component.kamelet.<kamelet>.<property> does not work, 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 the application.properties of the project for the required 
properties. So the two doc pages are wrong (kubernetes-secrets-component.adoc, 
property-placeholder-functions.adoc), and are fixed with this issue.

The language options are confirmed the other way round as well: 
camel.language.quickjs.engineMaxMemory works but is reported, and 
camel.language.simple.trim passes the check but fails at startup ("Error 
binding property (camel.language.simple.trim=false) with name: trim on bean: 
SimpleLanguage"). The check uses the options of the expression, not the options 
of the language bean that camel-main binds.

_Claude Code on behalf of davsclaus_

> camel-yaml-dsl-validator - camel validate reports Kamelet and language 
> options that work at runtime
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26294
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26294
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.24.0
>
>
> A sweep of the code blocks of the documentation through the checks of camel 
> validate source (see CAMEL-26293) found three kinds of options the validator 
> reports as wrong, although Camel takes them when the route runs:
> * *Options a Kamelet forwards with advancedOptions.* With advancedOptions: 
> true, the extra options of a Kamelet endpoint go to the endpoint the Kamelet 
> wraps, but the validator reports them as unknown properties of the Kamelet: 
> kamelet-component.adoc, kamelet:aws-s3-source with maxConnections: 100 
> ("unknown property 'maxConnections'").
> * *Kamelet properties in application.properties.* 
> camel.component.kamelet.<kamelet>.<property> keys are reported as unknown 
> options (kubernetes-secrets-component.adoc, 
> property-placeholder-functions.adoc: 
> camel.component.kamelet.postgresql-sink.databaseName ...). And a route whose 
> required Kamelet properties come from these keys is reported for the missing 
> properties (kubernetes-secrets-component.adoc: kamelet:postgresql-sink, "the 
> required properties password, serverName, username are missing").
> * *Language options that are not in the catalog.* 
> camel.language.<name>.<property> is bound to the setters of the language, but 
> the validator only knows the options of the catalog: 
> camel.language.typesafe-ai.endpoint, threshold and state 
> (typesafe-ai-language.adoc), and camel.language.quickjs.engineMaxMemory and 
> engineMaxEvaluations (quickjs-language.adoc). The fix may be in the catalog 
> (declare these options of the language) rather than in the validator.
> All three make camel validate, the MCP camel_validate_source tool and the 
> editor of the Camel CLI reject a working configuration, which an AI assistant 
> then tries to fix.
> _Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to