davsclaus opened a new pull request, #26215: URL: https://github.com/apache/camel/pull/26215
Fixes https://issues.apache.org/jira/browse/CAMEL-24658 ## What Users, and AI models driving Camel through tooling, refer to components by the protocol or product name rather than the Camel scheme: `mqtt` (`paho-mqtt5`), `s3` (`aws2-s3`), `rabbitmq` (`spring-rabbitmq`), `amq` (`activemq`). Until now the catalog could only be queried by exact scheme or label, so each tool kept its own alias list. ### camel-catalog Three new default methods on `CamelCatalog`, each taking a term and a max (0 = unlimited): - `suggestComponentNames(term, max)` — ranks by exact scheme, declared aliases, alternative schemes, title words, scheme words, and finally schemes containing the term (3+ chars). A component that shares one implementation under several schemes (imap/pop3/smtp, http/https, coap, cometd, smpp, disruptor) is returned once: by the scheme that matched, or otherwise its primary scheme. - `suggestDataFormatNames(term, max)` and `suggestLanguageNames(term, max)` — same idea by name, aliases, title words and camelCase name words (`yaml` -> `snakeYaml`). The ranking works on the existing JSON, so it also serves older catalog versions loaded through `CatalogLoader`. ### Component aliases Reuses the existing `@Metadata(aliases = ...)` (introduced for EIPs in CAMEL-23833) on the endpoint class; `EndpointSchemaGeneratorMojo` now copies it into the component model. `MailEndpoint` declares `mail`/`email` (no mail scheme or title contains "mail") and both ActiveMQ endpoints declare `amq`. ### Consumers - Camel TUI drops its hardcoded scheme alias map; the failed-send hint and `tui_catalog_doc` misses now return catalog suggestions. - `camel catalog component|dataformat|language --filter <term>` include the catalog suggestions in the "Did you mean?" output (`--filter servicebus` -> `azure-servicebus`). ### Docs New section in the camel-catalog user manual page. ## Tests - `CamelCatalogTest`: aliases in the component model, ranking (`s3`, `mqtt`, `amq`, `kafka`, ...), alternative-scheme dedupe (`smtp`, `https`, `mail`), max cap, data format and language lookups. - `CatalogComponentTest`: product-name suggestion on a filter with no direct hit. - The TUI alias-map unit test is removed since the behaviour moved to the catalog. Built and tested: camel-package-maven-plugin, camel-mail, camel-activemq, camel-activemq6, camel-catalog, camel-endpointdsl, camel-componentdsl, camel-jbang-core, camel-jbang-plugin-tui. --- _Claude Code on behalf of davsclaus_ 🤖 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]
