Saravanakumar Selvaraj created CAMEL-27410:
----------------------------------------------

             Summary: camel-package-maven-plugin: the Endpoint DSL has no 
method for an option with both the consumer and the producer label
                 Key: CAMEL-27410
                 URL: https://issues.apache.org/jira/browse/CAMEL-27410
             Project: Camel
          Issue Type: Bug
          Components: tooling
    Affects Versions: 4.23.0
            Reporter: Saravanakumar Selvaraj


Found while writing CAMEL-27388. The Endpoint DSL has no method for the maxKeys 
option of alibaba-oss, which has the labels consumer and producer.

The template endpoint-builder.vm of camel-package-maven-plugin decides in its 
macro process which builder gets an option. An option with the label producer 
passes only for the producer builder. An option with the label consumer passes 
only for the consumer builder. An option with both labels fails one of the two 
tests in every builder. So the consumer builder, the producer builder and the 
combined builder get no method for it.

The catalog has three such endpoint parameters, and the generated factories 
have no method for them:

- alibaba-oss: maxKeys (OSSEndpointBuilderFactory)
- ignite-cache: query (IgniteCacheEndpointBuilderFactory)
- ignite-messaging: clusterGroupExpression 
(IgniteMessagingEndpointBuilderFactory)

The endpoint URI accepts the three options, and the catalog lists them. Only 
the Endpoint DSL lacks them. A fourth option with both labels, topicName of 
salesforce, is a path option, which gets no method in any case.

Proposed change: the macro treats an option with both labels as an option with 
no side label. Such an option gets a method in the consumer builder, in the 
producer builder and in the combined builder. The three factories then get the 
missing methods.

CAMEL-27388 corrects the label of maxKeys, so two of the three options remain 
after it.

Checked on main at 43668a1677. The tag camel-4.23.0 has the same condition in 
the template, and its three factories lack the methods too.

_Claude Code on behalf of saravanakumar1987_



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

Reply via email to