[
https://issues.apache.org/jira/browse/CAMEL-27452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen reassigned CAMEL-27452:
-----------------------------------
Fix Version/s: 4.24.0
Assignee: Claus Ibsen
> camel-package-maven-plugin - option and header descriptions lose the text
> between angle brackets in the catalog, the docs and the endpoint DSL
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27452
> URL: https://issues.apache.org/jira/browse/CAMEL-27452
> Project: Camel
> Issue Type: Bug
> Components: camel-package-maven-plugin, tooling
> Affects Versions: 4.23.0
> Reporter: Federico Mariani
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> The build removes every {{<...>}} from the descriptions of component options
> and headers, not only HTML tags. Placeholders, operators, file names and
> generic types written in a {{description}} attribute are lost in the
> generated component JSON, the catalog, the option tables of the documentation
> and the Javadoc of the endpoint DSL.
> h3. Examples (generated component JSON on main)
> ||Component||Source description||Generated description||
> |camel-aws2-s3, header {{CamelAwsS3GrantFullControl}} (and the 3 other grant
> headers)|... a grantee expression such as {{id=<canonical-user-id>}},
> {{emailAddress=<email>}} or {{uri=<group-uri>}}|... a grantee expression such
> as id=, emailAddress= or uri=.|
> |camel-google-firestore, header {{CamelGoogleFirestoreQueryOperator}}|(e.g.,
> ==, <, >, <=, >=, !=, array-contains, ...)|(e.g., ==, , =, !=,
> array-contains, ...)|
> |camel-tahu, option {{bdSeqNumPath}}|files named as {{<Edge Node
> ID>-bdSeqNum}}|files named as -bdSeqNum|
> |camel-langchain4j-agent, option {{mcpServer}}|in the form of
> {{mcpServer.<name>.<property>=<value>}}|in the form of mcpServer..=|
> |camel-langchain4j-embeddingstore|SEARCH returns {{List<String>}} with text
> content instead of {{List<EmbeddingMatch>}}|SEARCH returns List with text
> content instead of List|
> h3. Cause
> {{JavadocHelper.sanitizeDescription}} (tooling/camel-tooling-util) is written
> for Javadoc and removes HTML with {{s.replaceAll("<.*?>", "")}}.
> {{EndpointSchemaGeneratorMojo.fixDoc}} also passes the plain text of the
> {{description}} attribute of options and headers through it. The match is not
> limited to tag names, so {{<, >}} in an operator list is removed too.
> h3. Scope
> A scan of the {{description = "..."}} attributes on main, checked against the
> generated JSON, finds 18 descriptions in 13 modules that lose text:
> * camel-aws2-s3 (4), camel-smpp (3)
> * camel-atom, camel-aws2-ddb, camel-azure-iothub, camel-event, camel-file,
> camel-google-firestore, camel-langchain4j-agent,
> camel-langchain4j-embeddingstore, camel-openfeature, camel-sjms, camel-tahu
> (1 each)
> camel-openai and camel-spring-ai-chat have the same problem, and CAMEL-27249
> fixes them. Some descriptions with {{<...>}} keep their text, so not every
> generator path is affected: camel-dataset, camel-rest-postman, the
> {{CamelTahuMetric.<name>}} headers of camel-tahu, the API JSON of camel-api
> and the simple language. The descriptions of the Camel CLI commands are not
> affected either: {{PrepareCamelJBangCommandsMojo}} has its own sanitizer.
> There is no runtime impact. The descriptions are read by users of the
> documentation and by the tools that use the catalog: Kaoto, the Camel CLI and
> its MCP server, and IDE tooling. Some of the lost text is what the user has
> to write, such as the grantee expression of camel-aws2-s3, the operators of
> camel-google-firestore or the file name of camel-tahu.
> h3. Possible fixes
> # Per component, as CAMEL-27249 does for camel-openai and
> camel-spring-ai-chat: write these descriptions without angle brackets. Add a
> check to camel-package-maven-plugin that fails the build when the sanitizer
> removes {{<...>}} that is not an HTML tag, so that new ones are caught.
> # In the tooling: remove only HTML tags (a list of the tags used in Javadoc),
> and escape {{<}}, {{>}} and {{&}} where a description is written into
> generated Javadoc (endpoint DSL, component DSL), because Javadoc reads
> {{<name>}} as an HTML tag. This changes many generated files.
> The first is smaller and keeps the generated Javadoc as it is.
> _Claude Code on behalf of Croway_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)