apache / camel-kamelets

Apache Camel Kamelets Repository
https://camel.apache.org
Apache License 2.0
54 stars 76 forks source link

Kamelet validator prevents @BeanInject usage #1173

Open christophd opened 1 year ago

christophd commented 1 year ago

I tried to use @BeanInject in camel-kamelets-utils in order to autowire beans that are defined in Kamelet template section. The Kamelet validation scripts prevents this with parameter %q is declared in kamelet %q but never used

This is because the bean is declared in Kamelet but not used with #bean:{{myBean}} syntax due to @BeanInject.

Is @BeanInject something we want to support? We would need to change the Kamelet validation tool accordingly

oscerd commented 1 year ago

I don't have strong opininion on this. I would prefer to keep the stuff simple, but relaxing validation for having some more flexibility in relation to beans is fine.