You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/09/13 08:11:24 UTC
(camel) branch camel-4.18.x updated: [backport camel-4.18.x] chore(docs): fix malformed tables and callouts that fail the website build (#26358)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.18.x by this push:
new 534f3fc9e3a6 [backport camel-4.18.x] chore(docs): fix malformed tables and callouts that fail the website build (#26358)
534f3fc9e3a6 is described below
commit 534f3fc9e3a61fa7575ecaa33e2fb01c5edf6ead
Author: Adriano Machado <60...@users.noreply.github.com>
AuthorDate: Sun Sep 13 04:11:17 2026 -0400
[backport camel-4.18.x] chore(docs): fix malformed tables and callouts that fail the website build (#26358)
* chore(docs): fix malformed tables and callouts that fail the website build
Backport of #26356 (commit 72878b5ec560 on main), adapted to
camel-4.18.x. The docs on this branch predate the multi-DSL rewrite, so
the fixes are applied by hand instead of cherry-picked:
- MvelHelper.escape() escapes "|" as "\|" (same change and test as on
main), and camel-jbang-bind.adoc gets the matching escaped pipes.
- joor-language, java-language: add the missing Optional type cell to
the optionalBody row.
- opensearch-component: add the missing separator in the Bulk row.
- hwcloud-smn-component: drop the stray trailing "|".
- infinispan-component, infinispan-embedded-component: wrap each
example in an open block so the second callout list is no longer
read as items 4 and 5 of the first one. On main, infinispan-component
was already fixed by the multi-DSL [tabs] rewrite.
- enterprise-integration-patterns: drop the stray trailing "|" on the
Step row. Already fixed on main by the EIP index reorganization.
This branch has no catalog copies of these docs, so there are no
mirrors to update.
_Claude Code on behalf of Adriano Machado (@ammachado)_
_This was generated by an AI agent and may contain inaccuracies.
Please verify before relying on it._
* chore(docs): don't double-escape pipes that a description already escapes
The javadoc of the bindy CsvRecord separator already writes its pipes
as "\|", because escape() never handled them. Escaping every pipe turned
those into "\\|", so the full build regenerated bindy-dataformat.adoc
and failed the uncommitted changes check. Only escape pipes that don't
already have a backslash in front, so camel-jbang-bind stays the only
generated page that changes.
_Claude Code on behalf of Adriano Machado (@ammachado)_
_This was generated by an AI agent and may contain inaccuracies.
Please verify before relying on it._
(cherry picked from commit 11cebc0062cfab2e2fe71f45444db3934f779a5d)
---
.../src/main/docs/hwcloud-smn-component.adoc | 2 +-
.../src/main/docs/infinispan-embedded-component.adoc | 4 ++++
.../src/main/docs/infinispan-component.adoc | 4 ++++
components/camel-joor/src/main/docs/java-language.adoc | 2 +-
components/camel-joor/src/main/docs/joor-language.adoc | 2 +-
.../src/main/docs/opensearch-component.adoc | 2 +-
.../eips/pages/enterprise-integration-patterns.adoc | 2 +-
.../ROOT/pages/jbang-commands/camel-jbang-bind.adoc | 4 ++--
.../org/apache/camel/maven/packaging/MvelHelper.java | 8 +++++++-
.../apache/camel/maven/packaging/MvelHelperTest.java | 18 ++++++++++++++++++
10 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/components/camel-huawei/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc b/components/camel-huawei/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
index abe4974a71dd..49e2b832d092 100644
--- a/components/camel-huawei/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
+++ b/components/camel-huawei/camel-huaweicloud-smn/src/main/docs/hwcloud-smn-component.adoc
@@ -86,7 +86,7 @@ include::partial$component-endpoint-headers.adoc[]
|=======================================================================
|Service |Operations
-|`publishMessageService` | publishAsTextMessage, publishAsTemplatedMessage|
+|`publishMessageService` | publishAsTextMessage, publishAsTemplatedMessage
|=======================================================================
diff --git a/components/camel-infinispan/camel-infinispan-embedded/src/main/docs/infinispan-embedded-component.adoc b/components/camel-infinispan/camel-infinispan-embedded/src/main/docs/infinispan-embedded-component.adoc
index 0e2430bb5806..f083c43bf97d 100644
--- a/components/camel-infinispan/camel-infinispan-embedded/src/main/docs/infinispan-embedded-component.adoc
+++ b/components/camel-infinispan/camel-infinispan-embedded/src/main/docs/infinispan-embedded-component.adoc
@@ -220,6 +220,7 @@ Write methods like put(key, value) and remove(key) do not return the previous va
* Put a key/value into a named cache:
+
+--
[source,java]
----
from("direct:start")
@@ -230,9 +231,11 @@ from("direct:start")
<1> Set the operation to perform
<2> Set the key used to identify the element in the cache
<3> Use the configured cache manager `cacheContainer` from the registry to put an element to the cache named `myCacheName`
+--
+
It is possible to configure the lifetime and/or the idle time before the entry expires and gets evicted from the cache, as example:
+
+--
[source,java]
----
from("direct:start")
@@ -244,6 +247,7 @@ from("direct:start")
----
<1> Set the lifespan of the entry
<2> Set the time unit for the lifespan
+--
* Queries
+
diff --git a/components/camel-infinispan/camel-infinispan/src/main/docs/infinispan-component.adoc b/components/camel-infinispan/camel-infinispan/src/main/docs/infinispan-component.adoc
index 6b93df29c00e..c8a728aeec2f 100644
--- a/components/camel-infinispan/camel-infinispan/src/main/docs/infinispan-component.adoc
+++ b/components/camel-infinispan/camel-infinispan/src/main/docs/infinispan-component.adoc
@@ -206,6 +206,7 @@ Write methods like put(key, value) and remove(key) do not return the previous va
* Put a key/value into a named cache:
+
+--
[source,java]
----
from("direct:start")
@@ -216,9 +217,11 @@ from("direct:start")
<1> Set the operation to perform
<2> Set the key used to identify the element in the cache
<3> Use the configured cache manager `cacheContainer` from the registry to put an element to the cache named `myCacheName`
+--
+
It is possible to configure the lifetime and/or the idle time before the entry expires and gets evicted from the cache, as example:
+
+--
[source,java]
----
from("direct:start")
@@ -230,6 +233,7 @@ from("direct:start")
----
<1> Set the lifespan of the entry
<2> Set the time unit for the lifespan
+--
* Queries
+
diff --git a/components/camel-joor/src/main/docs/java-language.adoc b/components/camel-joor/src/main/docs/java-language.adoc
index c145d503886e..828443ffaf5d 100644
--- a/components/camel-joor/src/main/docs/java-language.adoc
+++ b/components/camel-joor/src/main/docs/java-language.adoc
@@ -34,7 +34,7 @@ The Java language allows the following variables to be used in the script:
| `exchange` | Exchange | The Camel Exchange
| `message` | Message | The Camel message
| `body` | Object | The message body
-| `optionalBody` | The body wrapped in `java.util.Optional`.
+| `optionalBody` | Optional | The body wrapped in `java.util.Optional`.
|===
=== Functions
diff --git a/components/camel-joor/src/main/docs/joor-language.adoc b/components/camel-joor/src/main/docs/joor-language.adoc
index fa1b40d115d5..387200ab1f19 100644
--- a/components/camel-joor/src/main/docs/joor-language.adoc
+++ b/components/camel-joor/src/main/docs/joor-language.adoc
@@ -39,7 +39,7 @@ The jOOR language allows the following variables to be used in the script:
| `exchange` | Exchange | The Camel Exchange
| `message` | Message | The Camel message
| `body` | Object | The message body
-| `optionalBody` | The body wrapped in `java.util.Optional`.
+| `optionalBody` | Optional | The body wrapped in `java.util.Optional`.
|===
=== Functions
diff --git a/components/camel-opensearch/src/main/docs/opensearch-component.adoc b/components/camel-opensearch/src/main/docs/opensearch-component.adoc
index f913697c212b..30559f1c340a 100644
--- a/components/camel-opensearch/src/main/docs/opensearch-component.adoc
+++ b/components/camel-opensearch/src/main/docs/opensearch-component.adoc
@@ -72,7 +72,7 @@ You can set the name of the target index by setting the message header with the
|`DeleteIndex` |`String` or `DeleteIndexRequest.Builder` index name of the index to delete |Deletes the specified indexName and returns a status code in the body.
You can set the name of the target index by setting the message header with the key "indexName".
-|`Bulk` `Iterable` or `BulkRequest.Builder` of any type that is already accepted (DeleteOperation.Builder for delete operation, UpdateOperation.Builder for update operation, CreateOperation.Builder for create operation, byte[], InputStream, String, Reader, Map or any document type for index operation) | Adds/Updates/Deletes content from/to an index and returns a List<BulkResponseItem> object in the body
+|`Bulk` |`Iterable` or `BulkRequest.Builder` of any type that is already accepted (DeleteOperation.Builder for delete operation, UpdateOperation.Builder for update operation, CreateOperation.Builder for create operation, byte[], InputStream, String, Reader, Map or any document type for index operation) | Adds/Updates/Deletes content from/to an index and returns a List<BulkResponseItem> object in the body
You can set the name of the target index by setting the message header with the key "indexName".
|`Search` |`Map`, `String` or `SearchRequest.Builder` |Search the content with the map of query string.
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/enterprise-integration-patterns.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/enterprise-integration-patterns.adoc
index f72fa283e8a1..588f28a0ec94 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/enterprise-integration-patterns.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/enterprise-integration-patterns.adoc
@@ -327,7 +327,7 @@ a|image::eip/ControlBusIcon.gif[image]
|xref:log-eip.adoc[Log] |How can I log processing a message?
a|image::eip/RoutingTableIcon.gif[image]
-|xref:step-eip.adoc[Step] | Groups together a set of EIPs into a composite logical unit for metrics and monitoring. |
+|xref:step-eip.adoc[Step] | Groups together a set of EIPs into a composite logical unit for metrics and monitoring.
|===
diff --git a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-bind.adoc b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-bind.adoc
index ed22844f67e5..0963cc14783d 100644
--- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-bind.adoc
+++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-bind.adoc
@@ -19,9 +19,9 @@ camel bind [options]
[cols="2,5,1,2",options="header"]
|===
| Option | Description | Default | Type
-| `--error-handler` | Add error handler (none|log|sink:<endpoint>). Sink endpoints are expected in the format [[apigroup/]version:]kind:[namespace/]name, plain Camel URIs or Kamelet name. | | String
+| `--error-handler` | Add error handler (none\|log\|sink:<endpoint>). Sink endpoints are expected in the format [[apigroup/]version:]kind:[namespace/]name, plain Camel URIs or Kamelet name. | | String
| `--output` | Output format generated by this command (supports: file, yaml or json). | file | String
-| `--property` | Adds a pipe property in the form of [source|sink|error-handler|step-<n>].<key>=<value> where <n> is the step number starting from 1 | | String
+| `--property` | Adds a pipe property in the form of [source\|sink\|error-handler\|step-<n>].<key>=<value> where <n> is the step number starting from 1 | | String
| `--sink` | Sink (to) such as a Kamelet or Camel endpoint uri | | String
| `--source` | Source (from) such as a Kamelet or Camel endpoint uri | | String
| `--step` | Optional steps such as a Kamelet or Camel endpoint uri | | String
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MvelHelper.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MvelHelper.java
index 8e0870436d6d..f137cf6cb9c5 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MvelHelper.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MvelHelper.java
@@ -29,6 +29,8 @@ public final class MvelHelper {
private static final Pattern URL_ESCAPE = Pattern.compile("(?<!href=\")(http(:?s)?://|(:?s)?ftp(?:s)?://)");
+ private static final Pattern PIPE_ESCAPE = Pattern.compile("(?<!\\\\)\\|");
+
private MvelHelper() {
// utility class
}
@@ -40,7 +42,11 @@ public final class MvelHelper {
final String escapedCurlyBrackets = CURLY_BRACKET_ESCAPE.matcher(raw).replaceAll("\\\\$1\\}");
- return URL_ESCAPE.matcher(escapedCurlyBrackets).replaceAll("\\\\$1");
+ // the templates render the escaped text inside table cells, where a bare pipe starts a new cell;
+ // pipes the description already escapes are left alone
+ final String escapedPipes = PIPE_ESCAPE.matcher(escapedCurlyBrackets).replaceAll("\\\\|");
+
+ return URL_ESCAPE.matcher(escapedPipes).replaceAll("\\\\$1");
}
public static String componentName(String scheme) {
diff --git a/tooling/maven/camel-package-maven-plugin/src/test/java/org/apache/camel/maven/packaging/MvelHelperTest.java b/tooling/maven/camel-package-maven-plugin/src/test/java/org/apache/camel/maven/packaging/MvelHelperTest.java
index 13b03d9d0b2c..c88f306cee08 100644
--- a/tooling/maven/camel-package-maven-plugin/src/test/java/org/apache/camel/maven/packaging/MvelHelperTest.java
+++ b/tooling/maven/camel-package-maven-plugin/src/test/java/org/apache/camel/maven/packaging/MvelHelperTest.java
@@ -47,6 +47,15 @@ public class MvelHelperTest {
assertThat(MvelHelper.escape(given)).isEqualTo(expected);
}
+ // every template calling escape() renders the result inside a table cell, where an unescaped
+ // pipe starts a new cell and shifts or drops the remaining cells of the row; some descriptions
+ // (e.g. the bindy CsvRecord separator javadoc) already escape their pipes, and must be kept as-is
+ @ParameterizedTest
+ @MethodSource("pipeEscapeCases")
+ public void shouldEscapePipes(final String given, final String expected) {
+ assertThat(MvelHelper.escape(given)).isEqualTo(expected);
+ }
+
static Stream<Arguments> curlyBracketEscapeCases() {
return Stream.of(arguments("some {expression} here", "some \\{expression} here"));
}
@@ -60,4 +69,13 @@ public class MvelHelperTest {
arguments("ftp", "ftp"),
arguments("http", "http"));
}
+
+ static Stream<Arguments> pipeEscapeCases() {
+ return Stream.of(
+ arguments("Add error handler (none|log|sink:<endpoint>)", "Add error handler (none\\|log\\|sink:<endpoint>)"),
+ arguments("[source|sink] at http://example.com", "[source\\|sink] at \\http://example.com"),
+ arguments("the '\\|' sign, then you have to mask it, like '\\|'",
+ "the '\\|' sign, then you have to mask it, like '\\|'"),
+ arguments("none|log and '\\|'", "none\\|log and '\\|'"));
+ }
}