davsclaus opened a new pull request, #28021:
URL: https://github.com/apache/camel/pull/28021

   First part of CAMEL-25736: the YAML examples that are in the documentation, 
but were not read.
   
   ## What
   
   - **`DocBlocks` reads two more kinds of YAML blocks.** It is the extractor 
of the doc-samples plugin and of the tests that validate the documentation 
examples.
     - A listing with a delimiter longer than `----` (valid AsciiDoc, closed by 
the same line): 14 examples on 3 pages (ibm-watson-discovery, 
ibm-watson-language, spiffe).
     - A block that opens with a comment and then a top-level entry (`# send 
the dataset to a queue` then `- route:`): 35 examples on about 20 pages (jms, 
netty, exec, keycloak, docling, dataset and others). A list of steps with a 
comment above it stays a fragment, as before.
   - **`CatalogSamples` uses `DocBlocks`** instead of its own regex, so 
`camel_catalog_sample` reads the docs as the plugin and the tests do. It now 
also leaves out callout markers and the blocks marked as what to avoid.
   - **Docs examples fixed**, found by the tests once the blocks were read:
     - docling-batch-processing: the aggregate referenced its strategy as a 
language map, had its output as a sibling step instead of in its `steps`, and 
set a property the strategy does not have.
     - keycloak-consumer: the filter had no `steps` (its aggregate received 
every event) and `correlationExpression` had an extra `expression:` level; it 
now uses the built-in `GroupedBodyAggregationStrategy` instead of an undeclared 
bean.
     - keycloak-producer: the operation `setUserPassword` does not exist 
(`resetUserPassword`, as the Java version of the same example has), and the 
component configuration was `application.yaml` syntax inside the route file; it 
is an `application.properties` block now.
     - keycloak-security: `handled: true` as `handled` with a constant 
expression.
   
   The catalog copies of the four pages are updated with them.
   
   ## Result
   
   Checked through the MCP server: 298 of 413 components return a sample of 
their own (294 before): dataset, ibm-watson-discovery, ibm-watson-language and 
spiffe now have one, and pages such as jms, netty and exec have more.
   
   ## Tests
   
   `DocBlocksTest` is new. On a full reactor build, the tests of camel-catalog 
(1101), camel-yaml-dsl-validator (242), camel-jbang-core (2502) and 
camel-jbang-mcp (503) pass, `EipDocExamplesTest` and `CatalogDocExamplesTest` 
included.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
   


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