ammachado opened a new pull request, #1970:
URL: https://github.com/apache/camel-spring-boot/pull/1970

   ## Summary
   
   The camel-website build ([example 
run](https://github.com/apache/camel-website/actions/runs/34718609082/job/103620235677))
 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.
   - Not done: rendering the pages with Asciidoctor locally.
   
   ## Related
   
   - The website build also fails on `apache/camel` docs. Those are fixed 
separately in apache/camel#26356 (`main`), apache/camel#26357 (`camel-4.22.x`) 
and apache/camel#26358 (`camel-4.18.x`).
   - `camel-spring-boot-4.22.x` has the same generator code and the same broken 
pages, so it needs a backport of this PR.
   
   🤖 Generated with [Claude Code](https://claude.com/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._
   


-- 
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]

Reply via email to