oscerd commented on issue #1615:
URL: 
https://github.com/apache/camel-kamelets/issues/1615#issuecomment-5537055154

   Traced this through the current docs pipeline. The acute problem from #1609 
is fixed; what remains is the systematic part this issue actually asked for, 
and it lives in a file I cannot verify from here.
   
   ## The reported failure no longer has a source
   
   The warning was:
   
   ```
   WARN (asciidoctor): skipping reference to missing attribute: body
       file: modules/ROOT/examples/yaml/simple-filter-action.kamelet.yaml
   ```
   
   Checking every place an unescaped `{word}` could reach the rendered docs:
   
   **1. Kamelet descriptions and property examples — clean.** Parsed all 250 
Kamelets and searched every `description` and `example` value for 
attribute-reference-shaped text:
   
   ```
   occurrences: 0
   ```
   
   `simple-filter-action` in particular no longer carries an `example` on its 
`expression` property at all, so the original trigger is gone from the catalog 
side.
   
   **2. Pipe examples — escaped where it matters.** 
`templates/pipes/camel-k/simple-filter-action-pipe.yaml` has the escape applied:
   
   ```yaml
           expression: "\\${body} contains 'John'"
   ```
   
   and no other file under `templates/pipes/camel-k/` contains an unescaped 
`${`.
   
   **3. Doc partials — clean.** No `${...}` in any 
`docs/modules/ROOT/partials/*.adoc`.
   
   ## One inconsistency, and it is harmless
   
   `templates/pipes/core/simple-filter-action-pipe.yaml` still has it unescaped:
   
   ```yaml
                 expression: "${body} contains 'John'"
   ```
   
   That is fine, because `docs/modules/ROOT/examples/js/kamelets.js` reads 
**only** the camel-k directory:
   
   ```js
   f = "../camel-kamelets/templates/pipes/camel-k/" + file + ".yaml"
   ```
   
   and `templates/pipes/core/` — 170 files — is not referenced by any `.js`, 
`.adoc`, `.go` or `.yaml` in the docs pipeline. So the unescaped copy never 
reaches AsciiDoctor. Worth knowing it is deliberately divergent rather than an 
oversight to "fix", since escaping it would corrupt the example for anyone 
using those files directly.
   
   ## What is still open
   
   The issue asked for "replacements for all variables we find" — a systematic 
escape rather than a hand-applied backslash in one file. That is still not in 
place: the current state depends on an author remembering to write `\\${...}` 
in a camel-k pipe example. The next one written without it reintroduces the 
warning.
   
   The right place for that is `kamelets.js`, escaping on render so the source 
files stay literal. **I have not done it**, for a reason I want to be straight 
about: that file is consumed by the camel-website Antora build, which I cannot 
run here, so I would be changing rendering logic blind and could easily break 
250 pages to fix a warning that currently does not occur.
   
   Two ways forward, your call:
   
   1. **Close it.** The failure is not reproducible, all rendered sources are 
clean, and the risk is a build warning rather than a failure.
   2. **Keep it open for the `kamelets.js` escape**, to be done by someone who 
can run the website build and confirm the output across a few Kamelets.
   
   A third option I would not recommend: a validator rule rejecting unescaped 
`{word}` in descriptions and examples. It would catch the catalog side locally, 
but the catalog side is already clean and the actual risk is in pipe examples, 
so it would add a tripwire where the problem is not.
   
   ---
   _Claude Code on behalf of Andrea Cosentino_
   


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