This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 87991bb0c575 CAMEL-24710: docs - the YAML examples of the component
sub-pages, language and yaml-dsl pages validate (#26398)
87991bb0c575 is described below
commit 87991bb0c5753d70a596fd6184a2a6fb5888dec4
Author: Karol Krawczyk <[email protected]>
AuthorDate: Mon Sep 14 19:44:39 2026 +0200
CAMEL-24710: docs - the YAML examples of the component sub-pages, language
and yaml-dsl pages validate (#26398)
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
---
.../apache/camel/catalog/docs/a2a-consumer.adoc | 8 +-
.../apache/camel/catalog/docs/a2a-producer.adoc | 148 +++++----
.../catalog/docs/aws2-s3-consumer-examples.adoc | 30 +-
.../catalog/docs/azure-storage-blob-consumer.adoc | 18 +-
.../catalog/docs/docling-async-processing.adoc | 132 ++++----
.../catalog/docs/docling-batch-processing.adoc | 352 ++++++++++-----------
.../apache/camel/catalog/docs/docling-serve.adoc | 152 ++++-----
.../camel/catalog/docs/keycloak-security.adoc | 108 ++++---
.../camel/catalog/docs/kubernetes-summary.adoc | 24 +-
.../org/apache/camel/catalog/docs/oauth.adoc | 12 +-
.../org/apache/camel/catalog/docs/openai-mcp.adoc | 3 +-
.../camel/catalog/docs/openai-operations.adoc | 5 +-
.../camel/catalog/docs/openai-providers.adoc | 39 +--
.../org/apache/camel/catalog/docs/pqc-hybrid.adoc | 80 ++---
.../camel/catalog/docs/pqc-key-lifecycle.adoc | 38 +--
.../camel/catalog/docs/salesforce-rest-api.adoc | 13 +-
.../org/apache/camel/catalog/docs/yaml-dsl.adoc | 94 +++---
.../camel-a2a/src/main/docs/a2a-consumer.adoc | 8 +-
.../camel-a2a/src/main/docs/a2a-producer.adoc | 148 +++++----
.../src/main/docs/docling-async-processing.adoc | 132 ++++----
.../src/main/docs/docling-batch-processing.adoc | 352 ++++++++++-----------
.../camel-docling/src/main/docs/docling-serve.adoc | 152 ++++-----
.../camel-openai/src/main/docs/openai-mcp.adoc | 3 +-
.../src/main/docs/openai-operations.adoc | 5 +-
.../src/main/docs/openai-providers.adoc | 39 +--
.../src/main/docs/aws2-s3-consumer-examples.adoc | 30 +-
.../src/main/docs/azure-storage-blob-consumer.adoc | 18 +-
.../src/main/docs/keycloak-security.adoc | 108 ++++---
.../src/main/docs/kubernetes-summary.adoc | 24 +-
components/camel-oauth/src/main/docs/oauth.adoc | 12 +-
components/camel-pqc/src/main/docs/pqc-hybrid.adoc | 80 ++---
.../camel-pqc/src/main/docs/pqc-key-lifecycle.adoc | 38 +--
.../src/main/docs/salesforce-rest-api.adoc | 13 +-
.../dsl/jbang/core/commands/ai/SimpleChecks.java | 13 +-
.../commands/ai/SourceValidatorSimpleTest.java | 15 +
.../camel/dsl/yaml/validator/YamlValidator.java | 4 +-
.../dsl/yaml/validator/EipDocExamplesTest.java | 24 +-
.../validator/YamlValidatorPropertyHintTest.java | 15 +
.../camel-yaml-dsl/src/main/docs/yaml-dsl.adoc | 94 +++---
39 files changed, 1370 insertions(+), 1213 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/a2a-consumer.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/a2a-consumer.adoc
index 50330c6fd2ea..e5c8fd8d1649 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/a2a-consumer.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/a2a-consumer.adoc
@@ -378,8 +378,9 @@ You can also emit with an explicit state:
[source,yaml]
----
-- script:
- simple: "${a2a:emit(INPUT_REQUIRED, 'Please provide your address')}"
+steps:
+ - script:
+ simple: "${a2a:emit(INPUT_REQUIRED, 'Please provide your address')}"
----
NOTE: Use `script` EIP (not `setBody`) for `${a2a:emit()}` calls — `script`
evaluates the expression for its side effect without changing the message body.
Use `setBody` only for the final response.
@@ -595,6 +596,9 @@ The consumer enforces `maxPayloadSize` (default 6,291,456
bytes / 6 MiB) on inco
uri: a2a:classpath:agent-card.json
parameters:
maxPayloadSize: 10485760
+ steps:
+ - setBody:
+ constant: "final response"
----
=== CORS Support
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/a2a-producer.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/a2a-producer.adoc
index a624caf5c7ed..273a9c588df2 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/a2a-producer.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/a2a-producer.adoc
@@ -51,10 +51,11 @@ The producer:
[source,yaml]
----
-- to:
- uri: a2a:http://remote-agent:8080
- parameters:
- oauthProfile: my-profile
+steps:
+ - to:
+ uri: a2a:http://remote-agent:8080
+ parameters:
+ oauthProfile: my-profile
----
Acquires a token via client-credentials grant, caches it, and refreshes on
expiry.
@@ -63,31 +64,34 @@ Acquires a token via client-credentials grant, caches it,
and refreshes on expir
[source,yaml]
----
-- to:
- uri: a2a:http://remote-agent:8082
- parameters:
- apiKey: "{{my.api.key}}"
- apiKeyHeader: X-API-Key
+steps:
+ - to:
+ uri: a2a:http://remote-agent:8082
+ parameters:
+ apiKey: "{{my.api.key}}"
+ apiKeyHeader: X-API-Key
----
==== Bearer Token
[source,yaml]
----
-- to:
- uri: a2a:http://remote-agent:8080
- parameters:
- bearerToken: "{{my.token}}"
+steps:
+ - to:
+ uri: a2a:http://remote-agent:8080
+ parameters:
+ bearerToken: "{{my.token}}"
----
=== JSON-RPC Producer
[source,yaml]
----
-- to:
- uri: a2a:http://remote-agent:8081
- parameters:
- protocolBinding: JSONRPC
+steps:
+ - to:
+ uri: a2a:http://remote-agent:8081
+ parameters:
+ protocolBinding: JSONRPC
----
=== Producer Streaming
@@ -104,24 +108,25 @@ YAML::
+
[source,yaml]
----
-- setHeader:
- name: CamelA2AOperation
- constant: MESSAGE_STREAM
-- to: a2a:https://agent.example.com
-- split:
- simple: "${body}"
- streaming: true
- steps:
- - choice:
- when:
- - simple: "${body.statusUpdate} != null"
- steps:
- - log:
- message: "Progress: ${body.statusUpdate.status.state}"
- - simple: "${body.message} != null"
- steps:
- - log:
- message: "Final message received"
+steps:
+ - setHeader:
+ name: CamelA2AOperation
+ constant: MESSAGE_STREAM
+ - to: a2a:https://agent.example.com
+ - split:
+ simple: "${body}"
+ streaming: true
+ steps:
+ - choice:
+ when:
+ - simple: "${body.statusUpdate} != null"
+ steps:
+ - log:
+ message: "Progress: ${body.statusUpdate.status.state}"
+ - simple: "${body.message} != null"
+ steps:
+ - log:
+ message: "Final message received"
----
Java::
@@ -143,9 +148,10 @@ To buffer all events into a `List<StreamResponse>`:
[source,yaml]
----
-- to: a2a:https://agent.example.com
-- convertBodyTo:
- type: java.util.List
+steps:
+ - to: a2a:https://agent.example.com
+ - convertBodyTo:
+ type: java.util.List
----
==== Raw Passthrough (RAW mode)
@@ -158,13 +164,14 @@ YAML::
+
[source,yaml]
----
-- to:
- uri: a2a:https://agent.example.com?dataFormat=RAW
- parameters:
- operation: MESSAGE_STREAM
-- setHeader:
- name: Content-Type
- constant: text/event-stream
+steps:
+ - to:
+ uri: a2a:https://agent.example.com?dataFormat=RAW
+ parameters:
+ operation: MESSAGE_STREAM
+ - setHeader:
+ name: Content-Type
+ constant: text/event-stream
----
Java::
@@ -183,19 +190,20 @@ Subscribe to ongoing task updates from a remote agent:
[source,yaml]
----
-- setHeader:
- name: CamelA2AOperation
- constant: TASK_SUBSCRIBE
-- setHeader:
- name: CamelA2ATaskId
- simple: "${exchangeProperty.taskId}"
-- to: a2a:https://agent.example.com
-- split:
- simple: "${body}"
- streaming: true
- steps:
- - log:
- message: "Task update: ${body.statusUpdate.status.state}"
+steps:
+ - setHeader:
+ name: CamelA2AOperation
+ constant: TASK_SUBSCRIBE
+ - setHeader:
+ name: CamelA2ATaskId
+ simple: "${exchangeProperty.taskId}"
+ - to: a2a:https://agent.example.com
+ - split:
+ simple: "${body}"
+ streaming: true
+ steps:
+ - log:
+ message: "Task update: ${body.statusUpdate.status.state}"
----
Streaming requests use `asyncTimeout` (default 5 minutes) instead of the
standard 60-second request timeout. SSE heartbeat comments from the remote
agent are automatically filtered during parsing.
@@ -308,13 +316,17 @@ Call multiple agents concurrently using Camel's
`multicast` EIP:
[source,yaml]
----
-- multicast:
- parallelProcessing: true
- aggregationStrategy: "#class:MyAggregator"
- steps:
- - to: direct:call-weather
- - to: direct:call-news
- - to: direct:call-fortune
+- route:
+ from:
+ uri: direct:ask-agents
+ steps:
+ - multicast:
+ parallelProcessing: true
+ aggregationStrategy: "#class:MyAggregator"
+ steps:
+ - to: direct:call-weather
+ - to: direct:call-news
+ - to: direct:call-fortune
- route:
id: call-weather
@@ -342,7 +354,8 @@ Override the remote agent's URL from the card using
`host`/`port`/`basePath` con
[source,yaml]
----
-- to: a2a:https://agent.example.com?host=http://localhost&port=8080
+steps:
+ - to: a2a:https://agent.example.com?host=http://localhost&port=8080
----
Priority without producer credentials: `host` config > card's
`supportedInterfaces` URL > `agentCardSource` URL. When producer credentials
are configured (`apiKey`, `bearerToken`, or `oauthProfile`) and `host` is not
set, the producer sends credentialed requests only to the HTTP(S)
`agentCardSource` origin. This avoids sending credentials to a URL supplied by
the remote card's `supportedInterfaces` field. The `port` and `basePath`
producer overrides are applied when `host` is configured. [...]
@@ -355,7 +368,8 @@ By default, the producer does not follow HTTP redirects to
prevent credential le
[source,yaml]
----
-- to: a2a:https://agent.example.com?followRedirects=true
+steps:
+ - to: a2a:https://agent.example.com?followRedirects=true
----
NOTE: `followRedirects` applies to operation requests only. Agent card
discovery never follows redirects — a card URL that returns a redirect fails
with an error.
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-consumer-examples.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-consumer-examples.adoc
index ab28ca5d7e6d..f86b54a59b31 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-consumer-examples.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/aws2-s3-consumer-examples.adoc
@@ -39,9 +39,9 @@ YAML::
amazonS3Client: "#amazonS3Client"
moveAfterRead: true
destinationBucket: myothercamelbucket
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
@@ -175,9 +175,9 @@ YAML::
amazonS3Client: "#amazonS3Client"
prefix: processed/
delay: 30000
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
@@ -219,9 +219,9 @@ YAML::
delay: 60000
maxMessagesPerPoll: 5
includeBody: false
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
@@ -262,9 +262,9 @@ YAML::
amazonS3Client: "#amazonS3Client"
deleteAfterRead: false
fileName: "*.pdf"
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
@@ -304,9 +304,9 @@ YAML::
parameters:
amazonS3Client: "#amazonS3Client"
doneFileName: "*.done"
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-blob-consumer.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-blob-consumer.adoc
index a49f9cc45a4a..278efa914273 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-blob-consumer.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/azure-storage-blob-consumer.adoc
@@ -37,9 +37,9 @@ YAML::
blobName: hello.txt
accountName: yourAccountName
accessKey: yourAccessKey
- steps:
- - to:
- uri: file://blobdirectory
+ steps:
+ - to:
+ uri: file://blobdirectory
----
====
@@ -77,9 +77,9 @@ YAML::
accountName: yourAccountName
accessKey: yourAccessKey
fileDir: /var/to/awesome/dir
- steps:
- - to:
- uri: mock:results
+ steps:
+ - to:
+ uri: mock:results
----
====
@@ -117,9 +117,9 @@ YAML::
accountName: yourAccountName
accessKey: yourAccessKey
fileDir: /var/to/awesome/dir
- steps:
- - to:
- uri: mock:results
+ steps:
+ - to:
+ uri: mock:results
----
====
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-async-processing.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-async-processing.adoc
index 5b8b2996f8ec..bb7ee0eb8a57 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-async-processing.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-async-processing.adoc
@@ -35,17 +35,17 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- useAsyncMode: true
- asyncPollInterval: 2000
- asyncTimeout: 300000
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ useAsyncMode: true
+ asyncPollInterval: 2000
+ asyncTimeout: 300000
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -78,17 +78,17 @@ YAML::
uri: file:///data/large-documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- useAsyncMode: true
- asyncPollInterval: 5000
- asyncTimeout: 600000
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ useAsyncMode: true
+ asyncPollInterval: 5000
+ asyncTimeout: 600000
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -124,16 +124,16 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - process:
- ref: "asyncDecisionProcessor"
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - process:
+ ref: "asyncDecisionProcessor"
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -276,26 +276,26 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - log:
- message: "Starting async conversion for: ${header.CamelFileName}"
- - to:
- uri: docling:convert
- parameters:
- operation: "SUBMIT_ASYNC_CONVERSION"
- useDoclingServe: true
- - log:
- message: "Submitted conversion with task ID: ${body}"
- - setHeader:
- name: "taskId"
- expression:
- simple:
- expression: "${body}"
- # For YAML, simpler to use Java processor bean or built-in async mode
- - to:
- uri: bean:asyncPollingProcessor
- - to:
- uri: file:///data/output
+ steps:
+ - log:
+ message: "Starting async conversion for: ${header.CamelFileName}"
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "SUBMIT_ASYNC_CONVERSION"
+ useDoclingServe: true
+ - log:
+ message: "Submitted conversion with task ID: ${body}"
+ - setHeader:
+ name: "taskId"
+ expression:
+ simple:
+ expression: "${body}"
+ # For YAML, simpler to use Java processor bean or built-in async mode
+ - to:
+ uri: bean:asyncPollingProcessor
+ - to:
+ uri: file:///data/output
----
====
@@ -381,20 +381,20 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- useAsyncMode: true
- asyncPollInterval: 1000
- asyncTimeout: 120000
- contentInBody: true
- - to:
- uri: file:///data/output
- parameters:
- fileName: "${header.CamelFileName}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ useAsyncMode: true
+ asyncPollInterval: 1000
+ asyncTimeout: 120000
+ contentInBody: true
+ - to:
+ uri: file:///data/output
+ parameters:
+ fileName: "${header.CamelFileName}"
----
====
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-batch-processing.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-batch-processing.adoc
index 072fd1a3b6dd..477e747a0f1e 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-batch-processing.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-batch-processing.adoc
@@ -82,35 +82,35 @@ YAML::
id: batch-convert
from:
uri: direct:documents
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- batchParallelism: 4
- batchFailOnFirstError: true
- - log:
- message: "Processed
${header.CamelDoclingBatchSuccessCount}/${header.CamelDoclingBatchTotalDocuments}
documents successfully"
- - split:
- expression:
- simple:
- expression: "${body.results}"
- steps:
- - choice:
- when:
- - expression:
- simple:
- expression: "${body.success}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ batchParallelism: 4
+ batchFailOnFirstError: true
+ - log:
+ message: "Processed
${header.CamelDoclingBatchSuccessCount}/${header.CamelDoclingBatchTotalDocuments}
documents successfully"
+ - split:
+ expression:
+ simple:
+ expression: "${body.results}"
+ steps:
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body.success}"
+ steps:
+ - to:
+ uri: file:///data/output
+ parameters:
+ fileName: "${body.documentId}.md"
+ otherwise:
steps:
- - to:
- uri: file:///data/output
- parameters:
- fileName: "${body.documentId}.md"
- otherwise:
- steps:
- - log:
- message: "Failed: ${body.originalPath} -
${body.errorMessage}"
+ - log:
+ message: "Failed: ${body.originalPath} -
${body.errorMessage}"
----
====
@@ -184,18 +184,18 @@ YAML::
parameters:
noop: true
maxMessagesPerPoll: 50
- steps:
- - convertBodyTo:
- type: "java.lang.String"
- - setHeader:
- name: "documentPath"
- expression:
- simple:
- expression: "${body}"
- - to:
- uri: seda:document-queue
- parameters:
- waitForTaskToComplete: "Never"
+ steps:
+ - convertBodyTo:
+ type: "java.lang.String"
+ - setHeader:
+ name: "documentPath"
+ expression:
+ simple:
+ expression: "${body}"
+ - to:
+ uri: seda:document-queue
+ parameters:
+ waitForTaskToComplete: "Never"
# Route 2: Aggregate into batches
- route:
@@ -203,50 +203,50 @@ YAML::
uri: seda:document-queue
parameters:
concurrentConsumers: 1
- steps:
- - aggregate:
- aggregationStrategy:
- bean: "documentListProcessor"
- correlationExpression:
- constant: true
- completionSize: 10
- completionTimeout: 5000
- - to:
- uri: direct:batch-process
+ steps:
+ - aggregate:
+ aggregationStrategy:
+ bean: "documentListProcessor"
+ correlationExpression:
+ constant: true
+ completionSize: 10
+ completionTimeout: 5000
+ - to:
+ uri: direct:batch-process
# Route 3: Process batch
- route:
from:
uri: direct:batch-process
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- batchParallelism: 5
- batchFailOnFirstError: false
- - split:
- expression:
- simple:
- expression: "${body.results}"
- steps:
- - choice:
- when:
- - expression:
- simple:
- expression: "${body.success}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ batchParallelism: 5
+ batchFailOnFirstError: false
+ - split:
+ expression:
+ simple:
+ expression: "${body.results}"
+ steps:
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body.success}"
+ steps:
+ - to:
+ uri: file:///data/output
+ parameters:
+ fileName: "${body.documentId}.md"
+ otherwise:
steps:
- to:
- uri: file:///data/output
+ uri: file:///data/failed
parameters:
- fileName: "${body.documentId}.md"
- otherwise:
- steps:
- - to:
- uri: file:///data/failed
- parameters:
- fileName: "${body.documentId}.error"
+ fileName: "${body.documentId}.error"
----
====
@@ -327,51 +327,51 @@ YAML::
id: batch-strict
from:
uri: direct:batch-strict
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- batchFailOnFirstError: true
- - log:
- message: "All documents converted successfully"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ batchFailOnFirstError: true
+ - log:
+ message: "All documents converted successfully"
# Continue on errors and process failures
- route:
id: batch-lenient
from:
uri: direct:batch-lenient
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- batchFailOnFirstError: false
- - log:
- message: "Batch completed: ${header.CamelDoclingBatchSuccessCount}
succeeded, ${header.CamelDoclingBatchFailureCount} failed"
- - choice:
- when:
- - expression:
- simple:
- expression: "${header.CamelDoclingBatchFailureCount} > 0"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ batchFailOnFirstError: false
+ - log:
+ message: "Batch completed: ${header.CamelDoclingBatchSuccessCount}
succeeded, ${header.CamelDoclingBatchFailureCount} failed"
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${header.CamelDoclingBatchFailureCount} > 0"
+ steps:
+ - split:
+ expression:
+ simple:
+ expression: "${body.failed}"
+ steps:
+ - log:
+ message: "Failed document: ${body.originalPath} -
${body.errorMessage}"
+ - to:
+ uri: file:///data/failed
+ parameters:
+ fileName: "${body.documentId}.error"
+ otherwise:
steps:
- - split:
- expression:
- simple:
- expression: "${body.failed}"
- steps:
- - log:
- message: "Failed document: ${body.originalPath} -
${body.errorMessage}"
- - to:
- uri: file:///data/failed
- parameters:
- fileName: "${body.documentId}.error"
- otherwise:
- steps:
- - log:
- message: "All documents processed successfully"
+ - log:
+ message: "All documents processed successfully"
----
====
@@ -586,82 +586,82 @@ YAML::
- route:
from:
uri: direct:batch-with-split
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- splitBatchResults: true
- contentInBody: true
- - split:
- expression:
- simple:
- expression: "${body}"
- steps:
- - choice:
- when:
- - expression:
- simple:
- expression: "${body.success}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ splitBatchResults: true
+ contentInBody: true
+ - split:
+ expression:
+ simple:
+ expression: "${body}"
+ steps:
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body.success}"
+ steps:
+ - log:
+ message: "Success: ${body.documentId}"
+ - to:
+ uri: file:///data/success
+ parameters:
+ fileName: "${body.documentId}.md"
+ otherwise:
steps:
- log:
- message: "Success: ${body.documentId}"
+ message: "Failed: ${body.documentId}"
- to:
- uri: file:///data/success
+ uri: file:///data/failed
parameters:
- fileName: "${body.documentId}.md"
- otherwise:
- steps:
- - log:
- message: "Failed: ${body.documentId}"
- - to:
- uri: file:///data/failed
- parameters:
- fileName: "${body.documentId}.error"
+ fileName: "${body.documentId}.error"
# Example 2: Split with parallel processing
- route:
id: batch-split-parallel
from:
uri: direct:batch-parallel
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- splitBatchResults: true
- batchParallelism: 4
- contentInBody: true
- - split:
- expression:
- simple:
- expression: "${body}"
- parallelProcessing: true
- steps:
- - log:
- message: "Processing document ${body.documentId} (index
${body.batchIndex})"
- - choice:
- when:
- - expression:
- simple:
- expression: "${body.success}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ splitBatchResults: true
+ batchParallelism: 4
+ contentInBody: true
+ - split:
+ expression:
+ simple:
+ expression: "${body}"
+ parallelProcessing: true
+ steps:
+ - log:
+ message: "Processing document ${body.documentId} (index
${body.batchIndex})"
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body.success}"
+ steps:
+ - log:
+ message: "Successfully converted
${body.documentId}"
+ - to:
+ uri: file:///data/processed
+ parameters:
+ fileName: "${body.documentId}.md"
+ otherwise:
steps:
- log:
- message: "Successfully converted ${body.documentId}"
+ message: "Failed to convert ${body.documentId}:
${body.errorMessage}"
- to:
- uri: file:///data/processed
+ uri: file:///data/errors
parameters:
- fileName: "${body.documentId}.md"
- otherwise:
- steps:
- - log:
- message: "Failed to convert ${body.documentId}:
${body.errorMessage}"
- - to:
- uri: file:///data/errors
- parameters:
- fileName: "${body.documentId}.error"
+ fileName: "${body.documentId}.error"
----
====
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-serve.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-serve.adoc
index c03ab74c720b..847a958a63e0 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-serve.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/docling-serve.adoc
@@ -28,15 +28,15 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- contentInBody: true
- - process:
- ref: "markdownProcessor"
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ contentInBody: true
+ - process:
+ ref: "markdownProcessor"
----
====
@@ -65,16 +65,16 @@ YAML::
uri: timer:convert
parameters:
repeatCount: 1
- steps:
- - setBody:
- constant: "https://arxiv.org/pdf/2501.17887"
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - setBody:
+ constant: "https://arxiv.org/pdf/2501.17887"
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -100,17 +100,17 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.(pdf|docx)"
- steps:
- - to:
- uri: docling:CONVERT_TO_HTML
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- contentInBody: true
- - to:
- uri: file:///data/converted
- parameters:
- fileName: "${file:name.noext}.html"
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_HTML
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ contentInBody: true
+ - to:
+ uri: file:///data/converted
+ parameters:
+ fileName: "${file:name.noext}.html"
----
====
@@ -145,17 +145,17 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- authenticationScheme: "BEARER"
- authenticationToken: "your-bearer-token-here"
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ authenticationScheme: "BEARER"
+ authenticationToken: "your-bearer-token-here"
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -187,18 +187,18 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- authenticationScheme: "API_KEY"
- authenticationToken: "your-api-key-here"
- apiKeyHeader: "X-API-Key"
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ authenticationScheme: "API_KEY"
+ authenticationToken: "your-api-key-here"
+ apiKeyHeader: "X-API-Key"
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -232,18 +232,18 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- authenticationScheme: "API_KEY"
- authenticationToken: "your-api-key-here"
- apiKeyHeader: "X-Custom-API-Key"
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ authenticationScheme: "API_KEY"
+ authenticationToken: "your-api-key-here"
+ apiKeyHeader: "X-Custom-API-Key"
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -276,17 +276,17 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "{{docling.serve.url}}"
- authenticationScheme: "BEARER"
- authenticationToken: "{{docling.serve.token}}"
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "{{docling.serve.url}}"
+ authenticationScheme: "BEARER"
+ authenticationToken: "{{docling.serve.token}}"
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/keycloak-security.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/keycloak-security.adoc
index 1700046c008d..3791f75263be 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/keycloak-security.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/keycloak-security.adoc
@@ -45,7 +45,7 @@ YAML::
uri: mock:result
# Bean definition in beans configuration
-beans:
+- beans:
- name: keycloakPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -101,7 +101,7 @@ YAML::
uri: mock:result
# Bean definition
-beans:
+- beans:
- name: audiencePolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -178,7 +178,7 @@ YAML::
uri: mock:admin-endpoint
# Bean definition
-beans:
+- beans:
- name: adminPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -225,7 +225,7 @@ YAML::
uri: mock:documents-endpoint
# Bean definition
-beans:
+- beans:
- name: documentsPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -268,7 +268,7 @@ YAML::
uri: mock:result
# Bean definition
-beans:
+- beans:
- name: userFlowPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -339,7 +339,7 @@ YAML::
uri: mock:result
# Bean definition
-beans:
+- beans:
- name: introspectionPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -453,7 +453,7 @@ YAML::
method: getData
# Security policies
-beans:
+- beans:
- name: paymentPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -540,7 +540,7 @@ YAML::
method: listUsers
# Security policies
-beans:
+- beans:
- name: adminIntrospection
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -621,7 +621,7 @@ YAML::
[source,yaml]
----
# Bean definition with Caffeine cache
-beans:
+- beans:
- name: highPerfPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -754,7 +754,7 @@ YAML::
uri: mock:admin-result
# Bean definition
-beans:
+- beans:
- name: keycloakPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -801,7 +801,7 @@ YAML::
method: processUser
# Bean definition
-beans:
+- beans:
- name: userPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -842,21 +842,21 @@ adminPolicy.setRequiredRoles("admin");
// Configure REST endpoints
rest("/api")
- .get("/documents")
- .route()
- .policy(readPolicy)
- .to("bean:documentService?method=listDocuments")
- .endRest()
- .post("/documents")
- .route()
- .policy(writePolicy)
- .to("bean:documentService?method=createDocument")
- .endRest()
- .delete("/documents/{id}")
- .route()
- .policy(adminPolicy)
- .to("bean:documentService?method=deleteDocument")
- .endRest();
+ .get("/documents").to("direct:list-documents")
+ .post("/documents").to("direct:create-document")
+ .delete("/documents/{id}").to("direct:delete-document");
+
+from("direct:list-documents")
+ .policy(readPolicy)
+ .to("bean:documentService?method=listDocuments");
+
+from("direct:create-document")
+ .policy(writePolicy)
+ .to("bean:documentService?method=createDocument");
+
+from("direct:delete-document")
+ .policy(adminPolicy)
+ .to("bean:documentService?method=deleteDocument");
----
YAML::
@@ -866,26 +866,50 @@ YAML::
- rest:
path: "/api"
get:
- - uri: "/documents"
- to: bean:documentService?method=listDocuments
- route:
- policy:
- ref: readPolicy
+ - path: "/documents"
+ to: direct:list-documents
post:
- - uri: "/documents"
- to: bean:documentService?method=createDocument
- route:
- policy:
- ref: writePolicy
+ - path: "/documents"
+ to: direct:create-document
delete:
- - uri: "/documents/{id}"
- to: bean:documentService?method=deleteDocument
- route:
- policy:
+ - path: "/documents/{id}"
+ to: direct:delete-document
+
+- route:
+ from:
+ uri: direct:list-documents
+ steps:
+ - policy:
+ ref: readPolicy
+ - to:
+ uri: bean:documentService
+ parameters:
+ method: listDocuments
+
+- route:
+ from:
+ uri: direct:create-document
+ steps:
+ - policy:
+ ref: writePolicy
+ - to:
+ uri: bean:documentService
+ parameters:
+ method: createDocument
+
+- route:
+ from:
+ uri: direct:delete-document
+ steps:
+ - policy:
ref: adminPolicy
+ - to:
+ uri: bean:documentService
+ parameters:
+ method: deleteDocument
# Bean definitions for policies
-beans:
+- beans:
- name: readPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -1110,7 +1134,7 @@ YAML::
method: adminOperations
# Bean definitions
-beans:
+- beans:
- name: strictPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kubernetes-summary.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kubernetes-summary.adoc
index 258fbddc54dd..fd80807a3973 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kubernetes-summary.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/kubernetes-summary.adoc
@@ -66,12 +66,12 @@ YAML::
- route:
from:
uri: direct:createPod
- steps:
- - to:
- uri: kubernetes-pods://{{kubernetes-host}}
- parameters:
- oauthToken: "{{kubernetes-token}}"
- operation: createPod
+ steps:
+ - to:
+ uri: kubernetes-pods://{{kubernetes-host}}
+ parameters:
+ oauthToken: "{{kubernetes-token}}"
+ operation: createPod
----
====
@@ -106,12 +106,12 @@ YAML::
- route:
from:
uri: direct:deletePod
- steps:
- - to:
- uri: kubernetes-pods://{{kubernetes-host}}
- parameters:
- oauthToken: "{{kubernetes-token}}"
- operation: deletePod
+ steps:
+ - to:
+ uri: kubernetes-pods://{{kubernetes-host}}
+ parameters:
+ oauthToken: "{{kubernetes-token}}"
+ operation: deletePod
----
====
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/oauth.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/oauth.adoc
index 87dda6081bdf..2042d3283f4f 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/oauth.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/oauth.adoc
@@ -134,12 +134,12 @@ Components reference a profile by name via the
`oauthProfile` parameter:
- route:
from:
uri: "direct:start"
- steps:
- - to:
- uri: "openai:chat-completion"
- parameters:
- model: "gpt-4"
- oauthProfile: "azure"
+ steps:
+ - to:
+ uri: "openai:chat-completion"
+ parameters:
+ model: "gpt-4"
+ oauthProfile: "azure"
----
=== Incoming Bearer Token Validation
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-mcp.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-mcp.adoc
index 1f5b17c1828c..1a92fce221b2 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-mcp.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-mcp.adoc
@@ -433,7 +433,8 @@ YAML::
storeFullResponse: true
mcpServer.api.transportType: streamableHttp
mcpServer.api.url: http://localhost:9090/mcp
- - loopDoWhile:
+ - loop:
+ doWhile: true
expression:
simple:
expression: "${header.CamelOpenAIFinishReason} == 'tool_calls'"
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-operations.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-operations.adoc
index 7989b9a40716..200689f4ea0a 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-operations.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-operations.adoc
@@ -115,8 +115,9 @@ For custom table schemas, complex queries (joins, CTEs), or
integration with exi
[source,yaml]
----
-- to:
- uri: sql:INSERT INTO documents (content, embedding) VALUES (:#text,
:#embedding::vector)
+steps:
+ - to:
+ uri: sql:INSERT INTO documents (content, embedding) VALUES (:#text,
:#embedding::vector)
----
==== Alternative: Dedicated Vector Databases
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-providers.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-providers.adoc
index 8c11874e949f..2eb2f671bb93 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-providers.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/openai-providers.adoc
@@ -48,12 +48,13 @@ YAML::
+
[source,yaml]
----
-- to:
- uri: openai:chat-completion
- parameters:
- baseUrl: http://localhost:11434/v1
- model: llama3.2
- userMessage: What is Apache Camel?
+steps:
+ - to:
+ uri: openai:chat-completion
+ parameters:
+ baseUrl: http://localhost:11434/v1
+ model: llama3.2
+ userMessage: What is Apache Camel?
----
====
@@ -209,13 +210,14 @@ properties and adds them to the request body:
[source,yaml]
----
-- to:
- uri: openai:chat-completion
- parameters:
- baseUrl: https://openrouter.ai/api/v1
- apiKey: "{{openrouter.api.key}}"
- model: anthropic/claude-sonnet-4-20250514
- additionalBodyProperty.provider:
'{"order":["anthropic","google"],"allow_fallbacks":false}'
+steps:
+ - to:
+ uri: openai:chat-completion
+ parameters:
+ baseUrl: https://openrouter.ai/api/v1
+ apiKey: "{{openrouter.api.key}}"
+ model: anthropic/claude-sonnet-4-20250514
+ additionalBodyProperty.provider:
'{"order":["anthropic","google"],"allow_fallbacks":false}'
----
[NOTE]
@@ -242,9 +244,10 @@ are optional and do not affect chat completions.
.Example using Ollama for local embeddings:
[source,yaml]
----
-- to:
- uri: openai:embeddings
- parameters:
- baseUrl: http://localhost:11434/v1
- embeddingModel: nomic-embed-text
+steps:
+ - to:
+ uri: openai:embeddings
+ parameters:
+ baseUrl: http://localhost:11434/v1
+ embeddingModel: nomic-embed-text
----
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pqc-hybrid.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pqc-hybrid.adoc
index ed9e483a05a9..da850fb5bd6a 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pqc-hybrid.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pqc-hybrid.adoc
@@ -73,27 +73,27 @@ YAML::
- route:
from:
uri: direct:sign
- steps:
- - to:
- uri: pqc:hybrid
- parameters:
- operation: hybridSign
- signatureAlgorithm: MLDSA
- classicalSignatureAlgorithm: ECDSA_P256
- - to:
- uri: mock:signed
+ steps:
+ - to:
+ uri: pqc:hybrid
+ parameters:
+ operation: hybridSign
+ signatureAlgorithm: MLDSA
+ classicalSignatureAlgorithm: ECDSA_P256
+ - to:
+ uri: mock:signed
- route:
from:
uri: direct:verify
- steps:
- - to:
- uri: pqc:hybrid
- parameters:
- operation: hybridVerify
- signatureAlgorithm: MLDSA
- classicalSignatureAlgorithm: ECDSA_P256
- - to:
- uri: mock:verified
+ steps:
+ - to:
+ uri: pqc:hybrid
+ parameters:
+ operation: hybridVerify
+ signatureAlgorithm: MLDSA
+ classicalSignatureAlgorithm: ECDSA_P256
+ - to:
+ uri: mock:verified
----
====
@@ -182,31 +182,31 @@ YAML::
- route:
from:
uri: direct:encapsulate
- steps:
- - to:
- uri: pqc:hybridkem
- parameters:
- operation: hybridGenerateSecretKeyEncapsulation
- keyEncapsulationAlgorithm: MLKEM
- classicalKEMAlgorithm: X25519
- symmetricKeyAlgorithm: AES
- symmetricKeyLength: 256
- - to:
- uri: mock:encapsulated
+ steps:
+ - to:
+ uri: pqc:hybridkem
+ parameters:
+ operation: hybridGenerateSecretKeyEncapsulation
+ keyEncapsulationAlgorithm: MLKEM
+ classicalKEMAlgorithm: X25519
+ symmetricKeyAlgorithm: AES
+ symmetricKeyLength: 256
+ - to:
+ uri: mock:encapsulated
- route:
from:
uri: direct:extract
- steps:
- - to:
- uri: pqc:hybridkem
- parameters:
- operation: hybridExtractSecretKeyEncapsulation
- keyEncapsulationAlgorithm: MLKEM
- classicalKEMAlgorithm: X25519
- symmetricKeyAlgorithm: AES
- symmetricKeyLength: 256
- - to:
- uri: mock:extracted
+ steps:
+ - to:
+ uri: pqc:hybridkem
+ parameters:
+ operation: hybridExtractSecretKeyEncapsulation
+ keyEncapsulationAlgorithm: MLKEM
+ classicalKEMAlgorithm: X25519
+ symmetricKeyAlgorithm: AES
+ symmetricKeyLength: 256
+ - to:
+ uri: mock:extracted
----
====
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pqc-key-lifecycle.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pqc-key-lifecycle.adoc
index 8e69fb5e24dc..c8c0799d895f 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pqc-key-lifecycle.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/pqc-key-lifecycle.adoc
@@ -1171,27 +1171,27 @@ YAML::
uri: timer:check-rotation
parameters:
period: 86400000 # Check daily
- steps:
- - bean:
- ref: keyLifecycleManager
- method: needsRotation('route-signing-key', 90, 10000)
- - choice:
- when:
- - expression:
- simple:
- expression: "${body} == true"
+ steps:
+ - bean:
+ ref: keyLifecycleManager
+ method: needsRotation('route-signing-key', 90, 10000)
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body} == true"
+ steps:
+ - log:
+ message: "Rotating signing key"
+ - bean:
+ ref: keyLifecycleManager
+ method: rotateKey('route-signing-key',
'route-signing-key-new', 'DILITHIUM')
+ - to:
+ uri: log:rotation-complete
+ otherwise:
steps:
- log:
- message: "Rotating signing key"
- - bean:
- ref: keyLifecycleManager
- method: rotateKey('route-signing-key',
'route-signing-key-new', 'DILITHIUM')
- - to:
- uri: log:rotation-complete
- otherwise:
- steps:
- - log:
- message: "Key rotation not needed"
+ message: "Key rotation not needed"
----
====
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/salesforce-rest-api.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/salesforce-rest-api.adoc
index 971537dd7dbc..4f7dcb91491b 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/salesforce-rest-api.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/salesforce-rest-api.adoc
@@ -100,7 +100,7 @@ from("direct:querySalesforce")
.to("salesforce:limits")
.choice()
.when(spel("#{1.0 * body.dailyApiRequests.remaining /
body.dailyApiRequests.max < 0.1}"))
- .to("salesforce:query?...")
+ .to("salesforce:query?sObjectQuery=SELECT Id, Name FROM Account")
.otherwise()
.setBody(constant("Used up Salesforce API limits, leaving 10% for
critical routes"))
.endChoice();
@@ -116,7 +116,7 @@ XML::
<choice>
<when>
<spel>#{1.0 * body.dailyApiRequests.remaining /
body.dailyApiRequests.max < 0.1}</spel>
- <to uri="salesforce:query?..."/>
+ <to uri="salesforce:query?sObjectQuery=SELECT Id, Name FROM Account"/>
</when>
<otherwise>
<setBody>
@@ -142,7 +142,9 @@ YAML::
- spel: "#{1.0 * body.dailyApiRequests.remaining /
body.dailyApiRequests.max < 0.1}"
steps:
- to:
- uri: "salesforce:query?..."
+ uri: salesforce:query
+ parameters:
+ sObjectQuery: "SELECT Id, Name FROM Account"
otherwise:
steps:
- setBody:
@@ -198,7 +200,7 @@ XML::
<from uri="direct:fetchRecentItems"/>
<to uri="salesforce:recent"/>
<split>
- <body/>
+ <simple>${body}</simple>
<log message="${body.name} at ${body.attributes.url}"/>
</split>
</route>
@@ -215,8 +217,7 @@ YAML::
- to:
uri: salesforce:recent
- split:
- expression:
- body: {}
+ simple: "${body}"
steps:
- log: "${body.name} at ${body.attributes.url}"
----
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/yaml-dsl.adoc
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/yaml-dsl.adoc
index 5e3211726362..c403e8b2d8cf 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/yaml-dsl.adoc
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/yaml-dsl.adoc
@@ -327,17 +327,15 @@ configure _tags_ as a Map:
[source,yaml]
----
- from:
- uri: "timer:tick"
+ uri: "plc4x"
parameters:
- period: "1000"
+ driver: "some driver url here"
+ tags:
+ "tags_2": "XXX"
+ "tags_6": "YYY"
steps:
- to:
- uri: "plc4x"
- parameters:
- driver: "some driver url here"
- tags:
- "tags_2": "XXX"
- "tags_6": "YYY"
+ uri: "log:plc"
----
In this example the _tags_ options is of Map type and can be configured using
YAML map syntax.
@@ -701,15 +699,15 @@ Classic::
+
[source,yaml]
----
-- log: "${body}"
+log: "${body}"
----
Canonical::
+
[source,yaml]
----
-- log:
- message: "${body}"
+log:
+ message: "${body}"
----
====
@@ -721,18 +719,18 @@ Classic::
+
[source,yaml]
----
-- setBody:
- simple: "Hello Camel from ${routeId}"
+setBody:
+ simple: "Hello Camel from ${routeId}"
----
Canonical::
+
[source,yaml]
----
-- setBody:
- expression:
- simple:
- expression: "Hello Camel from ${routeId}"
+setBody:
+ expression:
+ simple:
+ expression: "Hello Camel from ${routeId}"
----
====
@@ -744,20 +742,20 @@ Classic::
+
[source,yaml]
----
-- setHeader:
- name: Content-Type
- constant: "application/json"
+setHeader:
+ name: Content-Type
+ constant: "application/json"
----
Canonical::
+
[source,yaml]
----
-- setHeader:
- name: Content-Type
- expression:
- constant:
- expression: "application/json"
+setHeader:
+ name: Content-Type
+ expression:
+ constant:
+ expression: "application/json"
----
====
@@ -769,42 +767,42 @@ Classic::
+
[source,yaml]
----
-- choice:
- when:
- - simple: "${body} == 'Hello'"
- steps:
- - setProperty:
- name: myProp
- simple: "${body}"
- otherwise:
+choice:
+ when:
+ - simple: "${body} == 'Hello'"
steps:
- setProperty:
name: myProp
- constant: "default"
+ simple: "${body}"
+ otherwise:
+ steps:
+ - setProperty:
+ name: myProp
+ constant: "default"
----
Canonical::
+
[source,yaml]
----
-- choice:
- when:
- - expression:
- simple:
- expression: "${body} == 'Hello'"
- steps:
- - setProperty:
- name: myProp
- expression:
- simple:
- expression: "${body}"
- otherwise:
+choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body} == 'Hello'"
steps:
- setProperty:
name: myProp
expression:
- constant:
- expression: "default"
+ simple:
+ expression: "${body}"
+ otherwise:
+ steps:
+ - setProperty:
+ name: myProp
+ expression:
+ constant:
+ expression: "default"
----
====
diff --git a/components/camel-ai/camel-a2a/src/main/docs/a2a-consumer.adoc
b/components/camel-ai/camel-a2a/src/main/docs/a2a-consumer.adoc
index 50330c6fd2ea..e5c8fd8d1649 100644
--- a/components/camel-ai/camel-a2a/src/main/docs/a2a-consumer.adoc
+++ b/components/camel-ai/camel-a2a/src/main/docs/a2a-consumer.adoc
@@ -378,8 +378,9 @@ You can also emit with an explicit state:
[source,yaml]
----
-- script:
- simple: "${a2a:emit(INPUT_REQUIRED, 'Please provide your address')}"
+steps:
+ - script:
+ simple: "${a2a:emit(INPUT_REQUIRED, 'Please provide your address')}"
----
NOTE: Use `script` EIP (not `setBody`) for `${a2a:emit()}` calls — `script`
evaluates the expression for its side effect without changing the message body.
Use `setBody` only for the final response.
@@ -595,6 +596,9 @@ The consumer enforces `maxPayloadSize` (default 6,291,456
bytes / 6 MiB) on inco
uri: a2a:classpath:agent-card.json
parameters:
maxPayloadSize: 10485760
+ steps:
+ - setBody:
+ constant: "final response"
----
=== CORS Support
diff --git a/components/camel-ai/camel-a2a/src/main/docs/a2a-producer.adoc
b/components/camel-ai/camel-a2a/src/main/docs/a2a-producer.adoc
index a624caf5c7ed..273a9c588df2 100644
--- a/components/camel-ai/camel-a2a/src/main/docs/a2a-producer.adoc
+++ b/components/camel-ai/camel-a2a/src/main/docs/a2a-producer.adoc
@@ -51,10 +51,11 @@ The producer:
[source,yaml]
----
-- to:
- uri: a2a:http://remote-agent:8080
- parameters:
- oauthProfile: my-profile
+steps:
+ - to:
+ uri: a2a:http://remote-agent:8080
+ parameters:
+ oauthProfile: my-profile
----
Acquires a token via client-credentials grant, caches it, and refreshes on
expiry.
@@ -63,31 +64,34 @@ Acquires a token via client-credentials grant, caches it,
and refreshes on expir
[source,yaml]
----
-- to:
- uri: a2a:http://remote-agent:8082
- parameters:
- apiKey: "{{my.api.key}}"
- apiKeyHeader: X-API-Key
+steps:
+ - to:
+ uri: a2a:http://remote-agent:8082
+ parameters:
+ apiKey: "{{my.api.key}}"
+ apiKeyHeader: X-API-Key
----
==== Bearer Token
[source,yaml]
----
-- to:
- uri: a2a:http://remote-agent:8080
- parameters:
- bearerToken: "{{my.token}}"
+steps:
+ - to:
+ uri: a2a:http://remote-agent:8080
+ parameters:
+ bearerToken: "{{my.token}}"
----
=== JSON-RPC Producer
[source,yaml]
----
-- to:
- uri: a2a:http://remote-agent:8081
- parameters:
- protocolBinding: JSONRPC
+steps:
+ - to:
+ uri: a2a:http://remote-agent:8081
+ parameters:
+ protocolBinding: JSONRPC
----
=== Producer Streaming
@@ -104,24 +108,25 @@ YAML::
+
[source,yaml]
----
-- setHeader:
- name: CamelA2AOperation
- constant: MESSAGE_STREAM
-- to: a2a:https://agent.example.com
-- split:
- simple: "${body}"
- streaming: true
- steps:
- - choice:
- when:
- - simple: "${body.statusUpdate} != null"
- steps:
- - log:
- message: "Progress: ${body.statusUpdate.status.state}"
- - simple: "${body.message} != null"
- steps:
- - log:
- message: "Final message received"
+steps:
+ - setHeader:
+ name: CamelA2AOperation
+ constant: MESSAGE_STREAM
+ - to: a2a:https://agent.example.com
+ - split:
+ simple: "${body}"
+ streaming: true
+ steps:
+ - choice:
+ when:
+ - simple: "${body.statusUpdate} != null"
+ steps:
+ - log:
+ message: "Progress: ${body.statusUpdate.status.state}"
+ - simple: "${body.message} != null"
+ steps:
+ - log:
+ message: "Final message received"
----
Java::
@@ -143,9 +148,10 @@ To buffer all events into a `List<StreamResponse>`:
[source,yaml]
----
-- to: a2a:https://agent.example.com
-- convertBodyTo:
- type: java.util.List
+steps:
+ - to: a2a:https://agent.example.com
+ - convertBodyTo:
+ type: java.util.List
----
==== Raw Passthrough (RAW mode)
@@ -158,13 +164,14 @@ YAML::
+
[source,yaml]
----
-- to:
- uri: a2a:https://agent.example.com?dataFormat=RAW
- parameters:
- operation: MESSAGE_STREAM
-- setHeader:
- name: Content-Type
- constant: text/event-stream
+steps:
+ - to:
+ uri: a2a:https://agent.example.com?dataFormat=RAW
+ parameters:
+ operation: MESSAGE_STREAM
+ - setHeader:
+ name: Content-Type
+ constant: text/event-stream
----
Java::
@@ -183,19 +190,20 @@ Subscribe to ongoing task updates from a remote agent:
[source,yaml]
----
-- setHeader:
- name: CamelA2AOperation
- constant: TASK_SUBSCRIBE
-- setHeader:
- name: CamelA2ATaskId
- simple: "${exchangeProperty.taskId}"
-- to: a2a:https://agent.example.com
-- split:
- simple: "${body}"
- streaming: true
- steps:
- - log:
- message: "Task update: ${body.statusUpdate.status.state}"
+steps:
+ - setHeader:
+ name: CamelA2AOperation
+ constant: TASK_SUBSCRIBE
+ - setHeader:
+ name: CamelA2ATaskId
+ simple: "${exchangeProperty.taskId}"
+ - to: a2a:https://agent.example.com
+ - split:
+ simple: "${body}"
+ streaming: true
+ steps:
+ - log:
+ message: "Task update: ${body.statusUpdate.status.state}"
----
Streaming requests use `asyncTimeout` (default 5 minutes) instead of the
standard 60-second request timeout. SSE heartbeat comments from the remote
agent are automatically filtered during parsing.
@@ -308,13 +316,17 @@ Call multiple agents concurrently using Camel's
`multicast` EIP:
[source,yaml]
----
-- multicast:
- parallelProcessing: true
- aggregationStrategy: "#class:MyAggregator"
- steps:
- - to: direct:call-weather
- - to: direct:call-news
- - to: direct:call-fortune
+- route:
+ from:
+ uri: direct:ask-agents
+ steps:
+ - multicast:
+ parallelProcessing: true
+ aggregationStrategy: "#class:MyAggregator"
+ steps:
+ - to: direct:call-weather
+ - to: direct:call-news
+ - to: direct:call-fortune
- route:
id: call-weather
@@ -342,7 +354,8 @@ Override the remote agent's URL from the card using
`host`/`port`/`basePath` con
[source,yaml]
----
-- to: a2a:https://agent.example.com?host=http://localhost&port=8080
+steps:
+ - to: a2a:https://agent.example.com?host=http://localhost&port=8080
----
Priority without producer credentials: `host` config > card's
`supportedInterfaces` URL > `agentCardSource` URL. When producer credentials
are configured (`apiKey`, `bearerToken`, or `oauthProfile`) and `host` is not
set, the producer sends credentialed requests only to the HTTP(S)
`agentCardSource` origin. This avoids sending credentials to a URL supplied by
the remote card's `supportedInterfaces` field. The `port` and `basePath`
producer overrides are applied when `host` is configured. [...]
@@ -355,7 +368,8 @@ By default, the producer does not follow HTTP redirects to
prevent credential le
[source,yaml]
----
-- to: a2a:https://agent.example.com?followRedirects=true
+steps:
+ - to: a2a:https://agent.example.com?followRedirects=true
----
NOTE: `followRedirects` applies to operation requests only. Agent card
discovery never follows redirects — a card URL that returns a redirect fails
with an error.
diff --git
a/components/camel-ai/camel-docling/src/main/docs/docling-async-processing.adoc
b/components/camel-ai/camel-docling/src/main/docs/docling-async-processing.adoc
index 5b8b2996f8ec..bb7ee0eb8a57 100644
---
a/components/camel-ai/camel-docling/src/main/docs/docling-async-processing.adoc
+++
b/components/camel-ai/camel-docling/src/main/docs/docling-async-processing.adoc
@@ -35,17 +35,17 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- useAsyncMode: true
- asyncPollInterval: 2000
- asyncTimeout: 300000
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ useAsyncMode: true
+ asyncPollInterval: 2000
+ asyncTimeout: 300000
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -78,17 +78,17 @@ YAML::
uri: file:///data/large-documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- useAsyncMode: true
- asyncPollInterval: 5000
- asyncTimeout: 600000
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ useAsyncMode: true
+ asyncPollInterval: 5000
+ asyncTimeout: 600000
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -124,16 +124,16 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - process:
- ref: "asyncDecisionProcessor"
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - process:
+ ref: "asyncDecisionProcessor"
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -276,26 +276,26 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - log:
- message: "Starting async conversion for: ${header.CamelFileName}"
- - to:
- uri: docling:convert
- parameters:
- operation: "SUBMIT_ASYNC_CONVERSION"
- useDoclingServe: true
- - log:
- message: "Submitted conversion with task ID: ${body}"
- - setHeader:
- name: "taskId"
- expression:
- simple:
- expression: "${body}"
- # For YAML, simpler to use Java processor bean or built-in async mode
- - to:
- uri: bean:asyncPollingProcessor
- - to:
- uri: file:///data/output
+ steps:
+ - log:
+ message: "Starting async conversion for: ${header.CamelFileName}"
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "SUBMIT_ASYNC_CONVERSION"
+ useDoclingServe: true
+ - log:
+ message: "Submitted conversion with task ID: ${body}"
+ - setHeader:
+ name: "taskId"
+ expression:
+ simple:
+ expression: "${body}"
+ # For YAML, simpler to use Java processor bean or built-in async mode
+ - to:
+ uri: bean:asyncPollingProcessor
+ - to:
+ uri: file:///data/output
----
====
@@ -381,20 +381,20 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- useAsyncMode: true
- asyncPollInterval: 1000
- asyncTimeout: 120000
- contentInBody: true
- - to:
- uri: file:///data/output
- parameters:
- fileName: "${header.CamelFileName}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ useAsyncMode: true
+ asyncPollInterval: 1000
+ asyncTimeout: 120000
+ contentInBody: true
+ - to:
+ uri: file:///data/output
+ parameters:
+ fileName: "${header.CamelFileName}"
----
====
diff --git
a/components/camel-ai/camel-docling/src/main/docs/docling-batch-processing.adoc
b/components/camel-ai/camel-docling/src/main/docs/docling-batch-processing.adoc
index 072fd1a3b6dd..477e747a0f1e 100644
---
a/components/camel-ai/camel-docling/src/main/docs/docling-batch-processing.adoc
+++
b/components/camel-ai/camel-docling/src/main/docs/docling-batch-processing.adoc
@@ -82,35 +82,35 @@ YAML::
id: batch-convert
from:
uri: direct:documents
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- batchParallelism: 4
- batchFailOnFirstError: true
- - log:
- message: "Processed
${header.CamelDoclingBatchSuccessCount}/${header.CamelDoclingBatchTotalDocuments}
documents successfully"
- - split:
- expression:
- simple:
- expression: "${body.results}"
- steps:
- - choice:
- when:
- - expression:
- simple:
- expression: "${body.success}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ batchParallelism: 4
+ batchFailOnFirstError: true
+ - log:
+ message: "Processed
${header.CamelDoclingBatchSuccessCount}/${header.CamelDoclingBatchTotalDocuments}
documents successfully"
+ - split:
+ expression:
+ simple:
+ expression: "${body.results}"
+ steps:
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body.success}"
+ steps:
+ - to:
+ uri: file:///data/output
+ parameters:
+ fileName: "${body.documentId}.md"
+ otherwise:
steps:
- - to:
- uri: file:///data/output
- parameters:
- fileName: "${body.documentId}.md"
- otherwise:
- steps:
- - log:
- message: "Failed: ${body.originalPath} -
${body.errorMessage}"
+ - log:
+ message: "Failed: ${body.originalPath} -
${body.errorMessage}"
----
====
@@ -184,18 +184,18 @@ YAML::
parameters:
noop: true
maxMessagesPerPoll: 50
- steps:
- - convertBodyTo:
- type: "java.lang.String"
- - setHeader:
- name: "documentPath"
- expression:
- simple:
- expression: "${body}"
- - to:
- uri: seda:document-queue
- parameters:
- waitForTaskToComplete: "Never"
+ steps:
+ - convertBodyTo:
+ type: "java.lang.String"
+ - setHeader:
+ name: "documentPath"
+ expression:
+ simple:
+ expression: "${body}"
+ - to:
+ uri: seda:document-queue
+ parameters:
+ waitForTaskToComplete: "Never"
# Route 2: Aggregate into batches
- route:
@@ -203,50 +203,50 @@ YAML::
uri: seda:document-queue
parameters:
concurrentConsumers: 1
- steps:
- - aggregate:
- aggregationStrategy:
- bean: "documentListProcessor"
- correlationExpression:
- constant: true
- completionSize: 10
- completionTimeout: 5000
- - to:
- uri: direct:batch-process
+ steps:
+ - aggregate:
+ aggregationStrategy:
+ bean: "documentListProcessor"
+ correlationExpression:
+ constant: true
+ completionSize: 10
+ completionTimeout: 5000
+ - to:
+ uri: direct:batch-process
# Route 3: Process batch
- route:
from:
uri: direct:batch-process
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- batchParallelism: 5
- batchFailOnFirstError: false
- - split:
- expression:
- simple:
- expression: "${body.results}"
- steps:
- - choice:
- when:
- - expression:
- simple:
- expression: "${body.success}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ batchParallelism: 5
+ batchFailOnFirstError: false
+ - split:
+ expression:
+ simple:
+ expression: "${body.results}"
+ steps:
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body.success}"
+ steps:
+ - to:
+ uri: file:///data/output
+ parameters:
+ fileName: "${body.documentId}.md"
+ otherwise:
steps:
- to:
- uri: file:///data/output
+ uri: file:///data/failed
parameters:
- fileName: "${body.documentId}.md"
- otherwise:
- steps:
- - to:
- uri: file:///data/failed
- parameters:
- fileName: "${body.documentId}.error"
+ fileName: "${body.documentId}.error"
----
====
@@ -327,51 +327,51 @@ YAML::
id: batch-strict
from:
uri: direct:batch-strict
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- batchFailOnFirstError: true
- - log:
- message: "All documents converted successfully"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ batchFailOnFirstError: true
+ - log:
+ message: "All documents converted successfully"
# Continue on errors and process failures
- route:
id: batch-lenient
from:
uri: direct:batch-lenient
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- batchFailOnFirstError: false
- - log:
- message: "Batch completed: ${header.CamelDoclingBatchSuccessCount}
succeeded, ${header.CamelDoclingBatchFailureCount} failed"
- - choice:
- when:
- - expression:
- simple:
- expression: "${header.CamelDoclingBatchFailureCount} > 0"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ batchFailOnFirstError: false
+ - log:
+ message: "Batch completed: ${header.CamelDoclingBatchSuccessCount}
succeeded, ${header.CamelDoclingBatchFailureCount} failed"
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${header.CamelDoclingBatchFailureCount} > 0"
+ steps:
+ - split:
+ expression:
+ simple:
+ expression: "${body.failed}"
+ steps:
+ - log:
+ message: "Failed document: ${body.originalPath} -
${body.errorMessage}"
+ - to:
+ uri: file:///data/failed
+ parameters:
+ fileName: "${body.documentId}.error"
+ otherwise:
steps:
- - split:
- expression:
- simple:
- expression: "${body.failed}"
- steps:
- - log:
- message: "Failed document: ${body.originalPath} -
${body.errorMessage}"
- - to:
- uri: file:///data/failed
- parameters:
- fileName: "${body.documentId}.error"
- otherwise:
- steps:
- - log:
- message: "All documents processed successfully"
+ - log:
+ message: "All documents processed successfully"
----
====
@@ -586,82 +586,82 @@ YAML::
- route:
from:
uri: direct:batch-with-split
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- splitBatchResults: true
- contentInBody: true
- - split:
- expression:
- simple:
- expression: "${body}"
- steps:
- - choice:
- when:
- - expression:
- simple:
- expression: "${body.success}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ splitBatchResults: true
+ contentInBody: true
+ - split:
+ expression:
+ simple:
+ expression: "${body}"
+ steps:
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body.success}"
+ steps:
+ - log:
+ message: "Success: ${body.documentId}"
+ - to:
+ uri: file:///data/success
+ parameters:
+ fileName: "${body.documentId}.md"
+ otherwise:
steps:
- log:
- message: "Success: ${body.documentId}"
+ message: "Failed: ${body.documentId}"
- to:
- uri: file:///data/success
+ uri: file:///data/failed
parameters:
- fileName: "${body.documentId}.md"
- otherwise:
- steps:
- - log:
- message: "Failed: ${body.documentId}"
- - to:
- uri: file:///data/failed
- parameters:
- fileName: "${body.documentId}.error"
+ fileName: "${body.documentId}.error"
# Example 2: Split with parallel processing
- route:
id: batch-split-parallel
from:
uri: direct:batch-parallel
- steps:
- - to:
- uri: docling:convert
- parameters:
- operation: "BATCH_CONVERT_TO_MARKDOWN"
- useDoclingServe: true
- splitBatchResults: true
- batchParallelism: 4
- contentInBody: true
- - split:
- expression:
- simple:
- expression: "${body}"
- parallelProcessing: true
- steps:
- - log:
- message: "Processing document ${body.documentId} (index
${body.batchIndex})"
- - choice:
- when:
- - expression:
- simple:
- expression: "${body.success}"
+ steps:
+ - to:
+ uri: docling:convert
+ parameters:
+ operation: "BATCH_CONVERT_TO_MARKDOWN"
+ useDoclingServe: true
+ splitBatchResults: true
+ batchParallelism: 4
+ contentInBody: true
+ - split:
+ expression:
+ simple:
+ expression: "${body}"
+ parallelProcessing: true
+ steps:
+ - log:
+ message: "Processing document ${body.documentId} (index
${body.batchIndex})"
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body.success}"
+ steps:
+ - log:
+ message: "Successfully converted
${body.documentId}"
+ - to:
+ uri: file:///data/processed
+ parameters:
+ fileName: "${body.documentId}.md"
+ otherwise:
steps:
- log:
- message: "Successfully converted ${body.documentId}"
+ message: "Failed to convert ${body.documentId}:
${body.errorMessage}"
- to:
- uri: file:///data/processed
+ uri: file:///data/errors
parameters:
- fileName: "${body.documentId}.md"
- otherwise:
- steps:
- - log:
- message: "Failed to convert ${body.documentId}:
${body.errorMessage}"
- - to:
- uri: file:///data/errors
- parameters:
- fileName: "${body.documentId}.error"
+ fileName: "${body.documentId}.error"
----
====
diff --git a/components/camel-ai/camel-docling/src/main/docs/docling-serve.adoc
b/components/camel-ai/camel-docling/src/main/docs/docling-serve.adoc
index c03ab74c720b..847a958a63e0 100644
--- a/components/camel-ai/camel-docling/src/main/docs/docling-serve.adoc
+++ b/components/camel-ai/camel-docling/src/main/docs/docling-serve.adoc
@@ -28,15 +28,15 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- contentInBody: true
- - process:
- ref: "markdownProcessor"
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ contentInBody: true
+ - process:
+ ref: "markdownProcessor"
----
====
@@ -65,16 +65,16 @@ YAML::
uri: timer:convert
parameters:
repeatCount: 1
- steps:
- - setBody:
- constant: "https://arxiv.org/pdf/2501.17887"
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - setBody:
+ constant: "https://arxiv.org/pdf/2501.17887"
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -100,17 +100,17 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.(pdf|docx)"
- steps:
- - to:
- uri: docling:CONVERT_TO_HTML
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- contentInBody: true
- - to:
- uri: file:///data/converted
- parameters:
- fileName: "${file:name.noext}.html"
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_HTML
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ contentInBody: true
+ - to:
+ uri: file:///data/converted
+ parameters:
+ fileName: "${file:name.noext}.html"
----
====
@@ -145,17 +145,17 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- authenticationScheme: "BEARER"
- authenticationToken: "your-bearer-token-here"
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ authenticationScheme: "BEARER"
+ authenticationToken: "your-bearer-token-here"
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -187,18 +187,18 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- authenticationScheme: "API_KEY"
- authenticationToken: "your-api-key-here"
- apiKeyHeader: "X-API-Key"
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ authenticationScheme: "API_KEY"
+ authenticationToken: "your-api-key-here"
+ apiKeyHeader: "X-API-Key"
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -232,18 +232,18 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "http://localhost:5001"
- authenticationScheme: "API_KEY"
- authenticationToken: "your-api-key-here"
- apiKeyHeader: "X-Custom-API-Key"
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "http://localhost:5001"
+ authenticationScheme: "API_KEY"
+ authenticationToken: "your-api-key-here"
+ apiKeyHeader: "X-Custom-API-Key"
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
@@ -276,17 +276,17 @@ YAML::
uri: file:///data/documents
parameters:
include: ".*\\.pdf"
- steps:
- - to:
- uri: docling:CONVERT_TO_MARKDOWN
- parameters:
- useDoclingServe: true
- doclingServeUrl: "{{docling.serve.url}}"
- authenticationScheme: "BEARER"
- authenticationToken: "{{docling.serve.token}}"
- contentInBody: true
- - to:
- uri: file:///data/output
+ steps:
+ - to:
+ uri: docling:CONVERT_TO_MARKDOWN
+ parameters:
+ useDoclingServe: true
+ doclingServeUrl: "{{docling.serve.url}}"
+ authenticationScheme: "BEARER"
+ authenticationToken: "{{docling.serve.token}}"
+ contentInBody: true
+ - to:
+ uri: file:///data/output
----
====
diff --git a/components/camel-ai/camel-openai/src/main/docs/openai-mcp.adoc
b/components/camel-ai/camel-openai/src/main/docs/openai-mcp.adoc
index 1f5b17c1828c..1a92fce221b2 100644
--- a/components/camel-ai/camel-openai/src/main/docs/openai-mcp.adoc
+++ b/components/camel-ai/camel-openai/src/main/docs/openai-mcp.adoc
@@ -433,7 +433,8 @@ YAML::
storeFullResponse: true
mcpServer.api.transportType: streamableHttp
mcpServer.api.url: http://localhost:9090/mcp
- - loopDoWhile:
+ - loop:
+ doWhile: true
expression:
simple:
expression: "${header.CamelOpenAIFinishReason} == 'tool_calls'"
diff --git
a/components/camel-ai/camel-openai/src/main/docs/openai-operations.adoc
b/components/camel-ai/camel-openai/src/main/docs/openai-operations.adoc
index 7989b9a40716..200689f4ea0a 100644
--- a/components/camel-ai/camel-openai/src/main/docs/openai-operations.adoc
+++ b/components/camel-ai/camel-openai/src/main/docs/openai-operations.adoc
@@ -115,8 +115,9 @@ For custom table schemas, complex queries (joins, CTEs), or
integration with exi
[source,yaml]
----
-- to:
- uri: sql:INSERT INTO documents (content, embedding) VALUES (:#text,
:#embedding::vector)
+steps:
+ - to:
+ uri: sql:INSERT INTO documents (content, embedding) VALUES (:#text,
:#embedding::vector)
----
==== Alternative: Dedicated Vector Databases
diff --git
a/components/camel-ai/camel-openai/src/main/docs/openai-providers.adoc
b/components/camel-ai/camel-openai/src/main/docs/openai-providers.adoc
index 8c11874e949f..2eb2f671bb93 100644
--- a/components/camel-ai/camel-openai/src/main/docs/openai-providers.adoc
+++ b/components/camel-ai/camel-openai/src/main/docs/openai-providers.adoc
@@ -48,12 +48,13 @@ YAML::
+
[source,yaml]
----
-- to:
- uri: openai:chat-completion
- parameters:
- baseUrl: http://localhost:11434/v1
- model: llama3.2
- userMessage: What is Apache Camel?
+steps:
+ - to:
+ uri: openai:chat-completion
+ parameters:
+ baseUrl: http://localhost:11434/v1
+ model: llama3.2
+ userMessage: What is Apache Camel?
----
====
@@ -209,13 +210,14 @@ properties and adds them to the request body:
[source,yaml]
----
-- to:
- uri: openai:chat-completion
- parameters:
- baseUrl: https://openrouter.ai/api/v1
- apiKey: "{{openrouter.api.key}}"
- model: anthropic/claude-sonnet-4-20250514
- additionalBodyProperty.provider:
'{"order":["anthropic","google"],"allow_fallbacks":false}'
+steps:
+ - to:
+ uri: openai:chat-completion
+ parameters:
+ baseUrl: https://openrouter.ai/api/v1
+ apiKey: "{{openrouter.api.key}}"
+ model: anthropic/claude-sonnet-4-20250514
+ additionalBodyProperty.provider:
'{"order":["anthropic","google"],"allow_fallbacks":false}'
----
[NOTE]
@@ -242,9 +244,10 @@ are optional and do not affect chat completions.
.Example using Ollama for local embeddings:
[source,yaml]
----
-- to:
- uri: openai:embeddings
- parameters:
- baseUrl: http://localhost:11434/v1
- embeddingModel: nomic-embed-text
+steps:
+ - to:
+ uri: openai:embeddings
+ parameters:
+ baseUrl: http://localhost:11434/v1
+ embeddingModel: nomic-embed-text
----
diff --git
a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-consumer-examples.adoc
b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-consumer-examples.adoc
index ab28ca5d7e6d..f86b54a59b31 100644
---
a/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-consumer-examples.adoc
+++
b/components/camel-aws/camel-aws2-s3/src/main/docs/aws2-s3-consumer-examples.adoc
@@ -39,9 +39,9 @@ YAML::
amazonS3Client: "#amazonS3Client"
moveAfterRead: true
destinationBucket: myothercamelbucket
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
@@ -175,9 +175,9 @@ YAML::
amazonS3Client: "#amazonS3Client"
prefix: processed/
delay: 30000
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
@@ -219,9 +219,9 @@ YAML::
delay: 60000
maxMessagesPerPoll: 5
includeBody: false
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
@@ -262,9 +262,9 @@ YAML::
amazonS3Client: "#amazonS3Client"
deleteAfterRead: false
fileName: "*.pdf"
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
@@ -304,9 +304,9 @@ YAML::
parameters:
amazonS3Client: "#amazonS3Client"
doneFileName: "*.done"
- steps:
- - to:
- uri: mock:result
+ steps:
+ - to:
+ uri: mock:result
----
====
diff --git
a/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-consumer.adoc
b/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-consumer.adoc
index a49f9cc45a4a..278efa914273 100644
---
a/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-consumer.adoc
+++
b/components/camel-azure/camel-azure-storage-blob/src/main/docs/azure-storage-blob-consumer.adoc
@@ -37,9 +37,9 @@ YAML::
blobName: hello.txt
accountName: yourAccountName
accessKey: yourAccessKey
- steps:
- - to:
- uri: file://blobdirectory
+ steps:
+ - to:
+ uri: file://blobdirectory
----
====
@@ -77,9 +77,9 @@ YAML::
accountName: yourAccountName
accessKey: yourAccessKey
fileDir: /var/to/awesome/dir
- steps:
- - to:
- uri: mock:results
+ steps:
+ - to:
+ uri: mock:results
----
====
@@ -117,9 +117,9 @@ YAML::
accountName: yourAccountName
accessKey: yourAccessKey
fileDir: /var/to/awesome/dir
- steps:
- - to:
- uri: mock:results
+ steps:
+ - to:
+ uri: mock:results
----
====
diff --git a/components/camel-keycloak/src/main/docs/keycloak-security.adoc
b/components/camel-keycloak/src/main/docs/keycloak-security.adoc
index 1700046c008d..3791f75263be 100644
--- a/components/camel-keycloak/src/main/docs/keycloak-security.adoc
+++ b/components/camel-keycloak/src/main/docs/keycloak-security.adoc
@@ -45,7 +45,7 @@ YAML::
uri: mock:result
# Bean definition in beans configuration
-beans:
+- beans:
- name: keycloakPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -101,7 +101,7 @@ YAML::
uri: mock:result
# Bean definition
-beans:
+- beans:
- name: audiencePolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -178,7 +178,7 @@ YAML::
uri: mock:admin-endpoint
# Bean definition
-beans:
+- beans:
- name: adminPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -225,7 +225,7 @@ YAML::
uri: mock:documents-endpoint
# Bean definition
-beans:
+- beans:
- name: documentsPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -268,7 +268,7 @@ YAML::
uri: mock:result
# Bean definition
-beans:
+- beans:
- name: userFlowPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -339,7 +339,7 @@ YAML::
uri: mock:result
# Bean definition
-beans:
+- beans:
- name: introspectionPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -453,7 +453,7 @@ YAML::
method: getData
# Security policies
-beans:
+- beans:
- name: paymentPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -540,7 +540,7 @@ YAML::
method: listUsers
# Security policies
-beans:
+- beans:
- name: adminIntrospection
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -621,7 +621,7 @@ YAML::
[source,yaml]
----
# Bean definition with Caffeine cache
-beans:
+- beans:
- name: highPerfPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -754,7 +754,7 @@ YAML::
uri: mock:admin-result
# Bean definition
-beans:
+- beans:
- name: keycloakPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -801,7 +801,7 @@ YAML::
method: processUser
# Bean definition
-beans:
+- beans:
- name: userPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -842,21 +842,21 @@ adminPolicy.setRequiredRoles("admin");
// Configure REST endpoints
rest("/api")
- .get("/documents")
- .route()
- .policy(readPolicy)
- .to("bean:documentService?method=listDocuments")
- .endRest()
- .post("/documents")
- .route()
- .policy(writePolicy)
- .to("bean:documentService?method=createDocument")
- .endRest()
- .delete("/documents/{id}")
- .route()
- .policy(adminPolicy)
- .to("bean:documentService?method=deleteDocument")
- .endRest();
+ .get("/documents").to("direct:list-documents")
+ .post("/documents").to("direct:create-document")
+ .delete("/documents/{id}").to("direct:delete-document");
+
+from("direct:list-documents")
+ .policy(readPolicy)
+ .to("bean:documentService?method=listDocuments");
+
+from("direct:create-document")
+ .policy(writePolicy)
+ .to("bean:documentService?method=createDocument");
+
+from("direct:delete-document")
+ .policy(adminPolicy)
+ .to("bean:documentService?method=deleteDocument");
----
YAML::
@@ -866,26 +866,50 @@ YAML::
- rest:
path: "/api"
get:
- - uri: "/documents"
- to: bean:documentService?method=listDocuments
- route:
- policy:
- ref: readPolicy
+ - path: "/documents"
+ to: direct:list-documents
post:
- - uri: "/documents"
- to: bean:documentService?method=createDocument
- route:
- policy:
- ref: writePolicy
+ - path: "/documents"
+ to: direct:create-document
delete:
- - uri: "/documents/{id}"
- to: bean:documentService?method=deleteDocument
- route:
- policy:
+ - path: "/documents/{id}"
+ to: direct:delete-document
+
+- route:
+ from:
+ uri: direct:list-documents
+ steps:
+ - policy:
+ ref: readPolicy
+ - to:
+ uri: bean:documentService
+ parameters:
+ method: listDocuments
+
+- route:
+ from:
+ uri: direct:create-document
+ steps:
+ - policy:
+ ref: writePolicy
+ - to:
+ uri: bean:documentService
+ parameters:
+ method: createDocument
+
+- route:
+ from:
+ uri: direct:delete-document
+ steps:
+ - policy:
ref: adminPolicy
+ - to:
+ uri: bean:documentService
+ parameters:
+ method: deleteDocument
# Bean definitions for policies
-beans:
+- beans:
- name: readPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
@@ -1110,7 +1134,7 @@ YAML::
method: adminOperations
# Bean definitions
-beans:
+- beans:
- name: strictPolicy
type: org.apache.camel.component.keycloak.security.KeycloakSecurityPolicy
properties:
diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-summary.adoc
b/components/camel-kubernetes/src/main/docs/kubernetes-summary.adoc
index 258fbddc54dd..fd80807a3973 100644
--- a/components/camel-kubernetes/src/main/docs/kubernetes-summary.adoc
+++ b/components/camel-kubernetes/src/main/docs/kubernetes-summary.adoc
@@ -66,12 +66,12 @@ YAML::
- route:
from:
uri: direct:createPod
- steps:
- - to:
- uri: kubernetes-pods://{{kubernetes-host}}
- parameters:
- oauthToken: "{{kubernetes-token}}"
- operation: createPod
+ steps:
+ - to:
+ uri: kubernetes-pods://{{kubernetes-host}}
+ parameters:
+ oauthToken: "{{kubernetes-token}}"
+ operation: createPod
----
====
@@ -106,12 +106,12 @@ YAML::
- route:
from:
uri: direct:deletePod
- steps:
- - to:
- uri: kubernetes-pods://{{kubernetes-host}}
- parameters:
- oauthToken: "{{kubernetes-token}}"
- operation: deletePod
+ steps:
+ - to:
+ uri: kubernetes-pods://{{kubernetes-host}}
+ parameters:
+ oauthToken: "{{kubernetes-token}}"
+ operation: deletePod
----
====
diff --git a/components/camel-oauth/src/main/docs/oauth.adoc
b/components/camel-oauth/src/main/docs/oauth.adoc
index 87dda6081bdf..2042d3283f4f 100644
--- a/components/camel-oauth/src/main/docs/oauth.adoc
+++ b/components/camel-oauth/src/main/docs/oauth.adoc
@@ -134,12 +134,12 @@ Components reference a profile by name via the
`oauthProfile` parameter:
- route:
from:
uri: "direct:start"
- steps:
- - to:
- uri: "openai:chat-completion"
- parameters:
- model: "gpt-4"
- oauthProfile: "azure"
+ steps:
+ - to:
+ uri: "openai:chat-completion"
+ parameters:
+ model: "gpt-4"
+ oauthProfile: "azure"
----
=== Incoming Bearer Token Validation
diff --git a/components/camel-pqc/src/main/docs/pqc-hybrid.adoc
b/components/camel-pqc/src/main/docs/pqc-hybrid.adoc
index ed9e483a05a9..da850fb5bd6a 100644
--- a/components/camel-pqc/src/main/docs/pqc-hybrid.adoc
+++ b/components/camel-pqc/src/main/docs/pqc-hybrid.adoc
@@ -73,27 +73,27 @@ YAML::
- route:
from:
uri: direct:sign
- steps:
- - to:
- uri: pqc:hybrid
- parameters:
- operation: hybridSign
- signatureAlgorithm: MLDSA
- classicalSignatureAlgorithm: ECDSA_P256
- - to:
- uri: mock:signed
+ steps:
+ - to:
+ uri: pqc:hybrid
+ parameters:
+ operation: hybridSign
+ signatureAlgorithm: MLDSA
+ classicalSignatureAlgorithm: ECDSA_P256
+ - to:
+ uri: mock:signed
- route:
from:
uri: direct:verify
- steps:
- - to:
- uri: pqc:hybrid
- parameters:
- operation: hybridVerify
- signatureAlgorithm: MLDSA
- classicalSignatureAlgorithm: ECDSA_P256
- - to:
- uri: mock:verified
+ steps:
+ - to:
+ uri: pqc:hybrid
+ parameters:
+ operation: hybridVerify
+ signatureAlgorithm: MLDSA
+ classicalSignatureAlgorithm: ECDSA_P256
+ - to:
+ uri: mock:verified
----
====
@@ -182,31 +182,31 @@ YAML::
- route:
from:
uri: direct:encapsulate
- steps:
- - to:
- uri: pqc:hybridkem
- parameters:
- operation: hybridGenerateSecretKeyEncapsulation
- keyEncapsulationAlgorithm: MLKEM
- classicalKEMAlgorithm: X25519
- symmetricKeyAlgorithm: AES
- symmetricKeyLength: 256
- - to:
- uri: mock:encapsulated
+ steps:
+ - to:
+ uri: pqc:hybridkem
+ parameters:
+ operation: hybridGenerateSecretKeyEncapsulation
+ keyEncapsulationAlgorithm: MLKEM
+ classicalKEMAlgorithm: X25519
+ symmetricKeyAlgorithm: AES
+ symmetricKeyLength: 256
+ - to:
+ uri: mock:encapsulated
- route:
from:
uri: direct:extract
- steps:
- - to:
- uri: pqc:hybridkem
- parameters:
- operation: hybridExtractSecretKeyEncapsulation
- keyEncapsulationAlgorithm: MLKEM
- classicalKEMAlgorithm: X25519
- symmetricKeyAlgorithm: AES
- symmetricKeyLength: 256
- - to:
- uri: mock:extracted
+ steps:
+ - to:
+ uri: pqc:hybridkem
+ parameters:
+ operation: hybridExtractSecretKeyEncapsulation
+ keyEncapsulationAlgorithm: MLKEM
+ classicalKEMAlgorithm: X25519
+ symmetricKeyAlgorithm: AES
+ symmetricKeyLength: 256
+ - to:
+ uri: mock:extracted
----
====
diff --git a/components/camel-pqc/src/main/docs/pqc-key-lifecycle.adoc
b/components/camel-pqc/src/main/docs/pqc-key-lifecycle.adoc
index 8e69fb5e24dc..c8c0799d895f 100644
--- a/components/camel-pqc/src/main/docs/pqc-key-lifecycle.adoc
+++ b/components/camel-pqc/src/main/docs/pqc-key-lifecycle.adoc
@@ -1171,27 +1171,27 @@ YAML::
uri: timer:check-rotation
parameters:
period: 86400000 # Check daily
- steps:
- - bean:
- ref: keyLifecycleManager
- method: needsRotation('route-signing-key', 90, 10000)
- - choice:
- when:
- - expression:
- simple:
- expression: "${body} == true"
+ steps:
+ - bean:
+ ref: keyLifecycleManager
+ method: needsRotation('route-signing-key', 90, 10000)
+ - choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body} == true"
+ steps:
+ - log:
+ message: "Rotating signing key"
+ - bean:
+ ref: keyLifecycleManager
+ method: rotateKey('route-signing-key',
'route-signing-key-new', 'DILITHIUM')
+ - to:
+ uri: log:rotation-complete
+ otherwise:
steps:
- log:
- message: "Rotating signing key"
- - bean:
- ref: keyLifecycleManager
- method: rotateKey('route-signing-key',
'route-signing-key-new', 'DILITHIUM')
- - to:
- uri: log:rotation-complete
- otherwise:
- steps:
- - log:
- message: "Key rotation not needed"
+ message: "Key rotation not needed"
----
====
diff --git
a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-rest-api.adoc
b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-rest-api.adoc
index 971537dd7dbc..4f7dcb91491b 100644
---
a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-rest-api.adoc
+++
b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-rest-api.adoc
@@ -100,7 +100,7 @@ from("direct:querySalesforce")
.to("salesforce:limits")
.choice()
.when(spel("#{1.0 * body.dailyApiRequests.remaining /
body.dailyApiRequests.max < 0.1}"))
- .to("salesforce:query?...")
+ .to("salesforce:query?sObjectQuery=SELECT Id, Name FROM Account")
.otherwise()
.setBody(constant("Used up Salesforce API limits, leaving 10% for
critical routes"))
.endChoice();
@@ -116,7 +116,7 @@ XML::
<choice>
<when>
<spel>#{1.0 * body.dailyApiRequests.remaining /
body.dailyApiRequests.max < 0.1}</spel>
- <to uri="salesforce:query?..."/>
+ <to uri="salesforce:query?sObjectQuery=SELECT Id, Name FROM Account"/>
</when>
<otherwise>
<setBody>
@@ -142,7 +142,9 @@ YAML::
- spel: "#{1.0 * body.dailyApiRequests.remaining /
body.dailyApiRequests.max < 0.1}"
steps:
- to:
- uri: "salesforce:query?..."
+ uri: salesforce:query
+ parameters:
+ sObjectQuery: "SELECT Id, Name FROM Account"
otherwise:
steps:
- setBody:
@@ -198,7 +200,7 @@ XML::
<from uri="direct:fetchRecentItems"/>
<to uri="salesforce:recent"/>
<split>
- <body/>
+ <simple>${body}</simple>
<log message="${body.name} at ${body.attributes.url}"/>
</split>
</route>
@@ -215,8 +217,7 @@ YAML::
- to:
uri: salesforce:recent
- split:
- expression:
- body: {}
+ simple: "${body}"
steps:
- log: "${body.name} at ${body.attributes.url}"
----
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/SimpleChecks.java
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/SimpleChecks.java
index 51832938609b..c6ed0761cd88 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/SimpleChecks.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/SimpleChecks.java
@@ -22,6 +22,7 @@ import java.util.Set;
import org.apache.camel.catalog.CamelCatalog;
import org.apache.camel.catalog.LanguageValidationResult;
+import org.apache.camel.spi.SimpleLanguageFunctionFactory;
import static
org.apache.camel.dsl.jbang.core.commands.ai.YamlLines.countLeadingSpaces;
import static
org.apache.camel.dsl.jbang.core.commands.ai.YamlLines.extractEipFromLine;
@@ -114,7 +115,7 @@ final class SimpleChecks {
: catalog.validateLanguageExpression(null, "simple",
simpleText);
if (!result.isSuccess()) {
String error = result.getShortError() != null ?
result.getShortError() : result.getError();
- if (error != null) {
+ if (error != null && !isMissingDependency(error)) {
errors.add("Line " + lineNum + ": Simple syntax error:
" + error
+ aggregatedSizeHint(error, lines, i,
lineIndent));
}
@@ -126,6 +127,16 @@ final class SimpleChecks {
return errors;
}
+ /**
+ * A function served by a language or a component that is not on the
classpath of the check (${jsonpath(...)},
+ * ${a2a:text}): the route works when the dependency is there, which the
check cannot know, so it is not reported.
+ */
+ static boolean isMissingDependency(String error) {
+ return error.startsWith("No language could be found for:")
+ || error.startsWith("No " +
SimpleLanguageFunctionFactory.FACTORY + "/")
+ && error.contains("service could be found in the
classpath");
+ }
+
/**
* ${size} or ${count} written inside an aggregate: the parser's
did-you-mean (${length}) is about the function,
* what the author wants is the number of aggregated messages, an exchange
property.
diff --git
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/SourceValidatorSimpleTest.java
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/SourceValidatorSimpleTest.java
index e6396c765365..8fb32cb123af 100644
---
a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/SourceValidatorSimpleTest.java
+++
b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/ai/SourceValidatorSimpleTest.java
@@ -239,4 +239,19 @@ class SourceValidatorSimpleTest {
assertThat(msgs).hasSize(1);
assertThat(msgs.get(0)).contains("Unknown function:
size").doesNotContain("CamelAggregatedSize");
}
+
+ @Test
+ void functionOfALanguageOrComponentNotOnTheClasspathIsNotReported() {
+ List<String> msgs = SourceValidator.validateYamlSimple("""
+ - from:
+ uri: direct:start
+ steps:
+ - setHeader:
+ name: city
+ simple: "${jsonpath($.address.city)}"
+ - log:
+ message: "Agent replied: ${a2a:text}"
+ """, catalog);
+ assertThat(msgs).isEmpty();
+ }
}
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/main/java/org/apache/camel/dsl/yaml/validator/YamlValidator.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/main/java/org/apache/camel/dsl/yaml/validator/YamlValidator.java
index 6e67bcdf62fc..2b7e191b064a 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/main/java/org/apache/camel/dsl/yaml/validator/YamlValidator.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/main/java/org/apache/camel/dsl/yaml/validator/YamlValidator.java
@@ -245,7 +245,9 @@ public class YamlValidator {
boolean seenContent = false;
for (int i = 0; i < lines.length; i++) {
String t = lines[i].trim();
- if (t.equals("---") || t.equals("...")) {
+ // a marker starts at column 1; an indented --- or ... is text,
such as a line of a block scalar
+ String marker = lines[i].stripTrailing();
+ if (marker.equals("---") || marker.equals("...")) {
if (seenContent) {
return Error.builder()
.messageKey("document")
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/EipDocExamplesTest.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/EipDocExamplesTest.java
index 20b814704390..505ec1386e95 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/EipDocExamplesTest.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/EipDocExamplesTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.dsl.yaml.validator;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
import java.util.regex.Matcher;
@@ -56,6 +57,12 @@ class EipDocExamplesTest {
private static final Pattern YAML_BLOCK =
Pattern.compile("\\[source,yaml\\]\\n-{4}\\n(.*?)\\n-{4}", Pattern.DOTALL);
+ /**
+ * Examples that show YAML the schema cannot know, by page and a text
found in the example: the yaml-dsl page shows
+ * a step contributed by a custom YAML deserializer.
+ */
+ private static final Map<String, String> EXAMPLES_SKIPPED =
Map.of("yaml-dsl", "myStep:");
+
private static CamelCatalog catalog;
private static YamlValidator validator;
@@ -80,6 +87,17 @@ class EipDocExamplesTest {
assertThat(result.failures()).as("EIP documentation examples that do
not validate").isEmpty();
}
+ @Test
+ void everyYamlExampleOfTheOtherDocumentationPagesValidates() throws
Exception {
+ List<String> pages = docNames(name -> !name.endsWith("-eip") &&
!PATTERN_PAGES.contains(name)
+ && !name.endsWith("-component") &&
!name.endsWith("-dataformat"));
+
+ DocExamples result = validate(pages);
+
+ assertThat(result.examples()).as("YAML route examples found in the
other documentation pages").isGreaterThan(200);
+ assertThat(result.failures()).as("Documentation examples of the other
pages that do not validate").isEmpty();
+ }
+
@Test
void everyYamlExampleOfTheDataFormatDocumentationValidates() throws
Exception {
List<String> pages
@@ -127,8 +145,12 @@ class EipDocExamplesTest {
// a fragment (an option list, a snippet), not a route file
continue;
}
- examples++;
n++;
+ String skipped = EXAMPLES_SKIPPED.get(page);
+ if (skipped != null && yaml.contains(skipped)) {
+ continue;
+ }
+ examples++;
List<Error> errors = validator.validate(yaml);
if (!errors.isEmpty()) {
failures.add(page + " example " + n + ": " +
errors.get(0).getMessage());
diff --git
a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/YamlValidatorPropertyHintTest.java
b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/YamlValidatorPropertyHintTest.java
index da7ace035790..6426251e3d45 100644
---
a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/YamlValidatorPropertyHintTest.java
+++
b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/YamlValidatorPropertyHintTest.java
@@ -114,6 +114,21 @@ public class YamlValidatorPropertyHintTest {
""")).isEmpty();
}
+ @Test
+ public void testIndentedDocumentMarkerIsText() throws Exception {
+ // a ... line in a script elides the rest of the code, it is text of
the block scalar
+ assertThat(validator.validate("""
+ - beans:
+ - name: myBean
+ type: com.acme.MyBean
+ scriptLanguage: groovy
+ script: >
+ bean = new com.acme.MyBean()
+ ...
+ return bean
+ """)).isEmpty();
+ }
+
@Test
public void testMapWhereAListIsExpectedSaysHowToWriteIt() throws Exception
{
List<Error> errors = validator.validate("""
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/docs/yaml-dsl.adoc
b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/docs/yaml-dsl.adoc
index 5e3211726362..c403e8b2d8cf 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/docs/yaml-dsl.adoc
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/main/docs/yaml-dsl.adoc
@@ -327,17 +327,15 @@ configure _tags_ as a Map:
[source,yaml]
----
- from:
- uri: "timer:tick"
+ uri: "plc4x"
parameters:
- period: "1000"
+ driver: "some driver url here"
+ tags:
+ "tags_2": "XXX"
+ "tags_6": "YYY"
steps:
- to:
- uri: "plc4x"
- parameters:
- driver: "some driver url here"
- tags:
- "tags_2": "XXX"
- "tags_6": "YYY"
+ uri: "log:plc"
----
In this example the _tags_ options is of Map type and can be configured using
YAML map syntax.
@@ -701,15 +699,15 @@ Classic::
+
[source,yaml]
----
-- log: "${body}"
+log: "${body}"
----
Canonical::
+
[source,yaml]
----
-- log:
- message: "${body}"
+log:
+ message: "${body}"
----
====
@@ -721,18 +719,18 @@ Classic::
+
[source,yaml]
----
-- setBody:
- simple: "Hello Camel from ${routeId}"
+setBody:
+ simple: "Hello Camel from ${routeId}"
----
Canonical::
+
[source,yaml]
----
-- setBody:
- expression:
- simple:
- expression: "Hello Camel from ${routeId}"
+setBody:
+ expression:
+ simple:
+ expression: "Hello Camel from ${routeId}"
----
====
@@ -744,20 +742,20 @@ Classic::
+
[source,yaml]
----
-- setHeader:
- name: Content-Type
- constant: "application/json"
+setHeader:
+ name: Content-Type
+ constant: "application/json"
----
Canonical::
+
[source,yaml]
----
-- setHeader:
- name: Content-Type
- expression:
- constant:
- expression: "application/json"
+setHeader:
+ name: Content-Type
+ expression:
+ constant:
+ expression: "application/json"
----
====
@@ -769,42 +767,42 @@ Classic::
+
[source,yaml]
----
-- choice:
- when:
- - simple: "${body} == 'Hello'"
- steps:
- - setProperty:
- name: myProp
- simple: "${body}"
- otherwise:
+choice:
+ when:
+ - simple: "${body} == 'Hello'"
steps:
- setProperty:
name: myProp
- constant: "default"
+ simple: "${body}"
+ otherwise:
+ steps:
+ - setProperty:
+ name: myProp
+ constant: "default"
----
Canonical::
+
[source,yaml]
----
-- choice:
- when:
- - expression:
- simple:
- expression: "${body} == 'Hello'"
- steps:
- - setProperty:
- name: myProp
- expression:
- simple:
- expression: "${body}"
- otherwise:
+choice:
+ when:
+ - expression:
+ simple:
+ expression: "${body} == 'Hello'"
steps:
- setProperty:
name: myProp
expression:
- constant:
- expression: "default"
+ simple:
+ expression: "${body}"
+ otherwise:
+ steps:
+ - setProperty:
+ name: myProp
+ expression:
+ constant:
+ expression: "default"
----
====