Skip to content

chore(docs): escape default values in generated starter option tables - #1970

Merged
davsclaus merged 1 commit into
apache:mainfrom
ammachado:chore/doc-table-fixes
Sep 13, 2026
Merged

davsclaus merged 1 commit into
apache:mainfrom
ammachado:chore/doc-table-fixes

Conversation

@ammachado

@ammachado ammachado commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Summary

The camel-website build (example run) fails with Asciidoctor errors on the Debezium starter pages:

ERROR (asciidoctor): dropping cells from incomplete row detected end of table
    file: docs/spring-boot/modules/ROOT/pages/starters/debezium-db2.adoc:129

The same error shows up for debezium-mongodb, debezium-mysql, debezium-oracle, debezium-postgres and debezium-sqlserver, on both main and camel-spring-boot-4.22.x.

Root cause. The default value of camel.component.debezium-*.custom-sanitize-pattern is a regex with | alternations (\.jaas.config$|.*basic.auth.user.info|...). UpdateStarterDocPageMojo escaped the Description column with escapeCell() but wrote the Default column as-is, so each | opened a new table cell. That row had 9 cells instead of 4. Asciidoctor only catches the mismatch at the closing |===, which is why the error points at the last row.

Changes

  • UpdateStarterDocPageMojo: pass default values through the existing escapeCell(), which escapes | and {. generatePage and SBProperty are now package-private so the test can call them.
  • UpdateStarterDocPageMojoTest (new): checks that a | in a default keeps the row at 4 cells, that a { in a default is escaped, and that boolean and missing defaults still render unchanged. The first two tests fail without the fix.
  • Regenerated pages (one row changed in each):
    • The six Debezium pages: the | in the custom-sanitize-pattern default is escaped.
    • activemq, activemq6, amqp, jms: the eager-poison-body default ${exception.message} becomes $\{exception.message}, the same way descriptions already handle {, so Asciidoctor no longer reads it as an attribute reference. This one did not break the build.

Verification

  • All 12 tests in camel-spring-boot-generator-maven-plugin pass.
  • I regenerated the pages with update-starter-doc-page on the ten affected starters. Only the ten rows above changed.
  • A scan of every generated starter page finds no option-table row with a cell count other than 4.
  • check-doc on this PR passes with no "dropping cells" errors in its log. It renders these docs through camel-website's Antora playbook, which uses failure_level: warn, so this confirms the pages render cleanly.

Related

🤖 Generated with Claude Code on behalf of Adriano Machado (@ammachado)

This was generated by an AI agent and may contain inaccuracies. Please verify before relying on it.

The website build fails with "dropping cells from incomplete row
detected end of table" on the Debezium starter pages. The default of
custom-sanitize-pattern is a regex with '|' alternations, and
UpdateStarterDocPageMojo wrote default values into the AsciiDoc table
unescaped, so each '|' opened a new cell.

Pass default values through escapeCell(), which already escapes '|'
and '{' in the description column. This also escapes the
${exception.message} default in the ActiveMQ, ActiveMQ 6, AMQP and JMS
pages so it is not read as an attribute reference.

Regenerate the ten affected starter pages.

_Claude Code on behalf of Adriano Machado (@ammachado)_

_This was generated by an AI agent and may contain inaccuracies.
Please verify before relying on it._
@davsclaus
davsclaus merged commit 76a7c54 into apache:main Sep 13, 2026
4 checks passed
davsclaus pushed a commit that referenced this pull request Sep 13, 2026
…#1971)

The website build fails with "dropping cells from incomplete row
detected end of table" on the Debezium starter pages. The default of
custom-sanitize-pattern is a regex with '|' alternations, and
UpdateStarterDocPageMojo wrote default values into the AsciiDoc table
unescaped, so each '|' opened a new cell.

Pass default values through escapeCell(), which already escapes '|'
and '{' in the description column. This also escapes the
${exception.message} default in the ActiveMQ, ActiveMQ 6, AMQP and JMS
pages so it is not read as an attribute reference.

Regenerate the ten affected starter pages.

Backport of #1970 to camel-spring-boot-4.22.x.
(cherry picked from commit 45145ce)

_Claude Code on behalf of Adriano Machado (@ammachado)_

_This was generated by an AI agent and may contain inaccuracies.
Please verify before relying on it._
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants