This is an automated email from the ASF dual-hosted git repository.

oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new ce4c4fe0d chore: default data types on the Database, Search, Cache and 
NoSQL Kamelets where the body is fixed (#3117) (#3276)
ce4c4fe0d is described below

commit ce4c4fe0d5612d45c8718d49d733a18dd4d4ecfd
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Nov 19 18:31:49 2026 +0100

    chore: default data types on the Database, Search, Cache and NoSQL Kamelets 
where the body is fixed (#3117) (#3276)
    
    Sinks that take a JSON document get an `in` default of `json` 
(application-json):
    mariadb-sink, mysql-sink, sqlserver-sink, oracle-database-sink, 
postgresql-sink,
    solr-sink, elasticsearch-index-sink and opensearch-index-sink. Camel now 
turns the
    incoming body into JSON text in bytes and sets Content-Type: 
application/json
    before the Kamelet unmarshals it. The JSON documents are stored as before.
    
    - The SQL, Elasticsearch and OpenSearch sinks leave Content-Type: 
application/json
      on the message afterwards (before, the incoming one was kept); their 
Output
      paragraphs say so. solr-sink removes Content-Type as before.
    - Citrus: the SQL, Elasticsearch and OpenSearch sink tests expect
      ct=application/json; the postgresql-sink test now checks the body, the
      Content-Type and the update count after the Kamelet.
    
    No default:
    - Sources: a source's `out` data type is applied only after kamelet:sink 
has run
      the whole consumer route, so the next step never sees it (Camel runtime 
issue).
    - mongodb-sink: the insert of a byte[] body fails in camel-mongodb with
      ClassCastException ([B cannot be cast to [Ljava.lang.Object;).
    - couchbase-sink, redis-sink, infinispan-sink, cassandra-sink: take any 
body, or a
      body set by options.
    
    Co-authored-by: Claude Opus 5.5 <[email protected]>
---
 kamelets/elasticsearch-index-sink.kamelet.yaml             |  8 +++++++-
 kamelets/mariadb-sink.kamelet.yaml                         |  9 ++++++++-
 kamelets/mysql-sink.kamelet.yaml                           |  9 ++++++++-
 kamelets/opensearch-index-sink.kamelet.yaml                |  8 +++++++-
 kamelets/oracle-database-sink.kamelet.yaml                 |  9 ++++++++-
 kamelets/postgresql-sink.kamelet.yaml                      |  9 ++++++++-
 kamelets/solr-sink.kamelet.yaml                            |  8 ++++++++
 kamelets/sqlserver-sink.kamelet.yaml                       |  9 ++++++++-
 .../src/main/resources/META-INF/kamelets-index.json        | 14 +++++++-------
 .../kamelets/elasticsearch-index-sink.kamelet.yaml         |  8 +++++++-
 .../src/main/resources/kamelets/mariadb-sink.kamelet.yaml  |  9 ++++++++-
 .../src/main/resources/kamelets/mysql-sink.kamelet.yaml    |  9 ++++++++-
 .../resources/kamelets/opensearch-index-sink.kamelet.yaml  |  8 +++++++-
 .../resources/kamelets/oracle-database-sink.kamelet.yaml   |  9 ++++++++-
 .../main/resources/kamelets/postgresql-sink.kamelet.yaml   |  9 ++++++++-
 .../src/main/resources/kamelets/solr-sink.kamelet.yaml     |  8 ++++++++
 .../main/resources/kamelets/sqlserver-sink.kamelet.yaml    |  9 ++++++++-
 .../database/mariadb/mariadb-sink-route.citrus.it.yaml     |  2 +-
 .../database/mysql/mysql-sink-route.citrus.it.yaml         |  2 +-
 .../oracle/oracle-database-sink-route.citrus.it.yaml       |  2 +-
 .../database/sqlserver/sqlserver-sink-route.citrus.it.yaml |  2 +-
 .../elasticsearch-index-sink-route.citrus.it.yaml          |  2 +-
 .../opensearch/opensearch-index-sink-route.citrus.it.yaml  |  2 +-
 .../postgres/postgresql-sink-route.citrus.it.yaml          |  7 +++++++
 .../src/test/resources/postgres/postgresql-sink-route.yaml |  2 ++
 25 files changed, 146 insertions(+), 27 deletions(-)

diff --git a/kamelets/elasticsearch-index-sink.kamelet.yaml 
b/kamelets/elasticsearch-index-sink.kamelet.yaml
index dadb5f69b..050aeaead 100644
--- a/kamelets/elasticsearch-index-sink.kamelet.yaml
+++ b/kamelets/elasticsearch-index-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is the document, as JSON text, such as `{"order": 42, 
"status": "shipped"}`. The optional `indexId` header (or `ce-indexid`) is the 
id of the document: a document with the same id is replaced. Without it, 
Elasticsearch makes up a new id, so each message adds a new document. The 
optional `indexName` header (or `ce-indexname`) is the index to write to, 
instead of the `indexName` option.
 
-      Output: when it is used inside a route, the body afterwards is the id of 
the document, as text.
+      Output: when it is used inside a route, the body afterwards is the id of 
the document, as text. The `Content-Type` header is set to `application/json`.
 
       Good to know: a body that is not JSON fails the message, and so does a 
message with no index, from the option or the header. It connects with TLS by 
default (`enableSSL`). For a cluster whose certificate is self-signed, or 
signed by a private certificate authority (CA), give the certificate of that CA 
in `certificate`; without it, the message fails with `PKIX path building 
failed`. When Elasticsearch does not answer, the message fails after 30 
seconds; `connectionTimeout` and `sock [...]
     required:
@@ -94,6 +94,7 @@ spec:
         example: 10000
   dataTypes:
     in:
+      default: json
       headers:
         indexId:
           title: Document ID
@@ -111,6 +112,11 @@ spec:
           title: Index Name (CloudEvents)
           description: The index to write to, when the message is a 
CloudEvent. Used only when `indexName` is not set.
           type: string
+      types:
+        json:
+          format: "application-json"
+          description: "The document, as JSON text in bytes."
+          mediaType: application/json
   types:
     out:
       mediaType: text/plain
diff --git a/kamelets/mariadb-sink.kamelet.yaml 
b/kamelets/mariadb-sink.kamelet.yaml
index 2ab128fb5..533e2323b 100644
--- a/kamelets/mariadb-sink.kamelet.yaml
+++ b/kamelets/mariadb-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -109,6 +109,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git a/kamelets/mysql-sink.kamelet.yaml b/kamelets/mysql-sink.kamelet.yaml
index d6013247f..16d6fa58b 100644
--- a/kamelets/mysql-sink.kamelet.yaml
+++ b/kamelets/mysql-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -109,6 +109,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git a/kamelets/opensearch-index-sink.kamelet.yaml 
b/kamelets/opensearch-index-sink.kamelet.yaml
index a96c59ef8..7982862dc 100644
--- a/kamelets/opensearch-index-sink.kamelet.yaml
+++ b/kamelets/opensearch-index-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is the document, as JSON text, such as `{"order": 42, 
"status": "shipped"}`. The optional `indexId` header (or `ce-indexid`) is the 
id of the document: a document with the same id is replaced. Without it, 
OpenSearch makes up a new id, so each message adds a new document. The optional 
`indexName` header (or `ce-indexname`) is the index to write to, instead of the 
`indexName` option.
 
-      Output: when it is used inside a route, the body afterwards is the id of 
the document, as text.
+      Output: when it is used inside a route, the body afterwards is the id of 
the document, as text. The `Content-Type` header is set to `application/json`.
 
       Good to know: a body that is not JSON fails the message, and so does a 
message with no index, from the option or the header. It connects with TLS by 
default (`enableSSL`). For a cluster whose certificate is self-signed, or 
signed by a private certificate authority (CA), give the certificate of that CA 
in `certificate`; without it, the message fails with `PKIX path building 
failed`. When OpenSearch does not answer, the message fails after 30 seconds; 
`connectionTimeout` and `socketT [...]
     required:
@@ -99,6 +99,7 @@ spec:
         example: 10000
   dataTypes:
     in:
+      default: json
       headers:
         indexId:
           title: Document ID
@@ -116,6 +117,11 @@ spec:
           title: Index Name (CloudEvents)
           description: The index to write to, when the message is a 
CloudEvent. Used only when `indexName` is not set.
           type: string
+      types:
+        json:
+          format: "application-json"
+          description: "The document, as JSON text in bytes."
+          mediaType: application/json
   types:
     out:
       mediaType: text/plain
diff --git a/kamelets/oracle-database-sink.kamelet.yaml 
b/kamelets/oracle-database-sink.kamelet.yaml
index 5e6249d16..1b3745dde 100644
--- a/kamelets/oracle-database-sink.kamelet.yaml
+++ b/kamelets/oracle-database-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -104,6 +104,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git a/kamelets/postgresql-sink.kamelet.yaml 
b/kamelets/postgresql-sink.kamelet.yaml
index fe04500d6..b785166af 100644
--- a/kamelets/postgresql-sink.kamelet.yaml
+++ b/kamelets/postgresql-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -109,6 +109,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git a/kamelets/solr-sink.kamelet.yaml b/kamelets/solr-sink.kamelet.yaml
index 165c00052..d4c68074c 100644
--- a/kamelets/solr-sink.kamelet.yaml
+++ b/kamelets/solr-sink.kamelet.yaml
@@ -101,6 +101,14 @@ spec:
   types:
     in:
       mediaType: application/json
+  dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One document as a JSON object, or several as a JSON 
array, as JSON text in bytes."
+          mediaType: application/json
   dependencies:
   - "camel:solr"
   - "camel:jackson3"
diff --git a/kamelets/sqlserver-sink.kamelet.yaml 
b/kamelets/sqlserver-sink.kamelet.yaml
index cd355a3e1..acc82b42e 100644
--- a/kamelets/sqlserver-sink.kamelet.yaml
+++ b/kamelets/sqlserver-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -114,6 +114,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git 
a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json 
b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
index 5cab801fa..1e54d7133 100644
--- a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
+++ b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
@@ -715,7 +715,7 @@
     "supportLevel" : "Stable",
     "title" : "ElasticSearch Index Sink",
     "summary" : "Stores each message, a JSON object, as a document in an index 
of Elasticsearch, so that it can be searched.",
-    "description" : "Stores each message, a JSON object, as a document in an 
index of Elasticsearch, so that it can be searched.\n\nUse it to make records 
searchable, such as orders, log entries or products, or to feed dashboards in 
Kibana. For OpenSearch, use `opensearch-index-sink`.\n\nInput: the body is the 
document, as JSON text, such as `{\"order\": 42, \"status\": \"shipped\"}`. The 
optional `indexId` header (or `ce-indexid`) is the id of the document: a 
document with the same id i [...]
+    "description" : "Stores each message, a JSON object, as a document in an 
index of Elasticsearch, so that it can be searched.\n\nUse it to make records 
searchable, such as orders, log entries or products, or to feed dashboards in 
Kibana. For OpenSearch, use `opensearch-index-sink`.\n\nInput: the body is the 
document, as JSON text, such as `{\"order\": 42, \"status\": \"shipped\"}`. The 
optional `indexId` header (or `ce-indexid`) is the id of the document: a 
document with the same id i [...]
     "group" : "ElasticSearch",
     "namespace" : "Search",
     "provider" : "Apache Software Foundation"
@@ -1415,7 +1415,7 @@
     "supportLevel" : "Stable",
     "title" : "MariaDB Sink",
     "summary" : "Runs an SQL statement, such as an INSERT, in a MariaDB 
database for each message, with values taken from the fields of the JSON object 
in the body.",
-    "description" : "Runs an SQL statement, such as an INSERT, in a MariaDB 
database for each message, with values taken from the fields of the JSON object 
in the body.\n\nUse it to store records from another system as rows of a table, 
such as each order that arrives on a Kafka topic, or to update or delete rows. 
To read rows, use `mariadb-source`.\n\nInput: the body is one JSON object, as 
text, such as `{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In `query`, write 
`:#username` where t [...]
+    "description" : "Runs an SQL statement, such as an INSERT, in a MariaDB 
database for each message, with values taken from the fields of the JSON object 
in the body.\n\nUse it to store records from another system as rows of a table, 
such as each order that arrives on a Kafka topic, or to update or delete rows. 
To read rows, use `mariadb-source`.\n\nInput: the body is one JSON object, as 
text, such as `{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In `query`, write 
`:#username` where t [...]
     "group" : "SQL",
     "namespace" : "Database",
     "provider" : "Apache Software Foundation"
@@ -1555,7 +1555,7 @@
     "supportLevel" : "Stable",
     "title" : "MySQL Sink",
     "summary" : "Runs an SQL statement, such as an INSERT, in a MySQL database 
for each message, with values taken from the fields of the JSON object in the 
body.",
-    "description" : "Runs an SQL statement, such as an INSERT, in a MySQL 
database for each message, with values taken from the fields of the JSON object 
in the body.\n\nUse it to store records from another system as rows of a table, 
such as each order that arrives on a Kafka topic, or to update or delete rows. 
To read rows, use `mysql-source`.\n\nInput: the body is one JSON object, as 
text, such as `{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In `query`, write 
`:#username` where the v [...]
+    "description" : "Runs an SQL statement, such as an INSERT, in a MySQL 
database for each message, with values taken from the fields of the JSON object 
in the body.\n\nUse it to store records from another system as rows of a table, 
such as each order that arrives on a Kafka topic, or to update or delete rows. 
To read rows, use `mysql-source`.\n\nInput: the body is one JSON object, as 
text, such as `{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In `query`, write 
`:#username` where the v [...]
     "group" : "SQL",
     "namespace" : "Database",
     "provider" : "Apache Software Foundation"
@@ -1615,7 +1615,7 @@
     "supportLevel" : "Stable",
     "title" : "OpenSearch Index Sink",
     "summary" : "Stores each message, a JSON object, as a document in an index 
of OpenSearch, so that it can be searched.",
-    "description" : "Stores each message, a JSON object, as a document in an 
index of OpenSearch, so that it can be searched.\n\nUse it to make records 
searchable, such as orders, log entries or products, or to feed dashboards in 
OpenSearch Dashboards. For Elasticsearch, use 
`elasticsearch-index-sink`.\n\nInput: the body is the document, as JSON text, 
such as `{\"order\": 42, \"status\": \"shipped\"}`. The optional `indexId` 
header (or `ce-indexid`) is the id of the document: a document  [...]
+    "description" : "Stores each message, a JSON object, as a document in an 
index of OpenSearch, so that it can be searched.\n\nUse it to make records 
searchable, such as orders, log entries or products, or to feed dashboards in 
OpenSearch Dashboards. For Elasticsearch, use 
`elasticsearch-index-sink`.\n\nInput: the body is the document, as JSON text, 
such as `{\"order\": 42, \"status\": \"shipped\"}`. The optional `indexId` 
header (or `ce-indexid`) is the id of the document: a document  [...]
     "group" : "OpenSearch",
     "namespace" : "Search",
     "provider" : "Apache Software Foundation"
@@ -1625,7 +1625,7 @@
     "supportLevel" : "Stable",
     "title" : "Oracle Database Sink",
     "summary" : "Runs an SQL statement, such as an INSERT, in an Oracle 
Database database for each message, with values taken from the fields of the 
JSON object in the body.",
-    "description" : "Runs an SQL statement, such as an INSERT, in an Oracle 
Database database for each message, with values taken from the fields of the 
JSON object in the body.\n\nUse it to store records from another system as rows 
of a table, such as each order that arrives on a Kafka topic, or to update or 
delete rows. To read rows, use `oracle-database-source`.\n\nInput: the body is 
one JSON object, as text, such as 
`{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In `query`, write `:# [...]
+    "description" : "Runs an SQL statement, such as an INSERT, in an Oracle 
Database database for each message, with values taken from the fields of the 
JSON object in the body.\n\nUse it to store records from another system as rows 
of a table, such as each order that arrives on a Kafka topic, or to update or 
delete rows. To read rows, use `oracle-database-source`.\n\nInput: the body is 
one JSON object, as text, such as 
`{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In `query`, write `:# [...]
     "group" : "SQL",
     "namespace" : "Database",
     "provider" : "Apache Software Foundation"
@@ -1655,7 +1655,7 @@
     "supportLevel" : "Stable",
     "title" : "PostgreSQL Sink",
     "summary" : "Runs an SQL statement, such as an INSERT, in a PostgreSQL 
database for each message, with values taken from the fields of the JSON object 
in the body.",
-    "description" : "Runs an SQL statement, such as an INSERT, in a PostgreSQL 
database for each message, with values taken from the fields of the JSON object 
in the body.\n\nUse it to store records from another system as rows of a table, 
such as each order that arrives on a Kafka topic, or to update or delete rows. 
To read rows, use `postgresql-source`.\n\nInput: the body is one JSON object, 
as text, such as `{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In `query`, 
write `:#username` w [...]
+    "description" : "Runs an SQL statement, such as an INSERT, in a PostgreSQL 
database for each message, with values taken from the fields of the JSON object 
in the body.\n\nUse it to store records from another system as rows of a table, 
such as each order that arrives on a Kafka topic, or to update or delete rows. 
To read rows, use `postgresql-source`.\n\nInput: the body is one JSON object, 
as text, such as `{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In `query`, 
write `:#username` w [...]
     "group" : "SQL",
     "namespace" : "Database",
     "provider" : "Apache Software Foundation"
@@ -2045,7 +2045,7 @@
     "supportLevel" : "Stable",
     "title" : "Microsoft SQL Server Sink",
     "summary" : "Runs an SQL statement, such as an INSERT, in a Microsoft SQL 
Server database for each message, with values taken from the fields of the JSON 
object in the body.",
-    "description" : "Runs an SQL statement, such as an INSERT, in a Microsoft 
SQL Server database for each message, with values taken from the fields of the 
JSON object in the body.\n\nUse it to store records from another system as rows 
of a table, such as each order that arrives on a Kafka topic, or to update or 
delete rows. To read rows, use `sqlserver-source`.\n\nInput: the body is one 
JSON object, as text, such as `{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In 
`query`, write `:#us [...]
+    "description" : "Runs an SQL statement, such as an INSERT, in a Microsoft 
SQL Server database for each message, with values taken from the fields of the 
JSON object in the body.\n\nUse it to store records from another system as rows 
of a table, such as each order that arrives on a Kafka topic, or to update or 
delete rows. To read rows, use `sqlserver-source`.\n\nInput: the body is one 
JSON object, as text, such as `{\"username\":\"oscerd\",\"city\":\"Rome\"}`. In 
`query`, write `:#us [...]
     "group" : "SQL",
     "namespace" : "Database",
     "provider" : "Apache Software Foundation"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-index-sink.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-index-sink.kamelet.yaml
index dadb5f69b..050aeaead 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-index-sink.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/elasticsearch-index-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is the document, as JSON text, such as `{"order": 42, 
"status": "shipped"}`. The optional `indexId` header (or `ce-indexid`) is the 
id of the document: a document with the same id is replaced. Without it, 
Elasticsearch makes up a new id, so each message adds a new document. The 
optional `indexName` header (or `ce-indexname`) is the index to write to, 
instead of the `indexName` option.
 
-      Output: when it is used inside a route, the body afterwards is the id of 
the document, as text.
+      Output: when it is used inside a route, the body afterwards is the id of 
the document, as text. The `Content-Type` header is set to `application/json`.
 
       Good to know: a body that is not JSON fails the message, and so does a 
message with no index, from the option or the header. It connects with TLS by 
default (`enableSSL`). For a cluster whose certificate is self-signed, or 
signed by a private certificate authority (CA), give the certificate of that CA 
in `certificate`; without it, the message fails with `PKIX path building 
failed`. When Elasticsearch does not answer, the message fails after 30 
seconds; `connectionTimeout` and `sock [...]
     required:
@@ -94,6 +94,7 @@ spec:
         example: 10000
   dataTypes:
     in:
+      default: json
       headers:
         indexId:
           title: Document ID
@@ -111,6 +112,11 @@ spec:
           title: Index Name (CloudEvents)
           description: The index to write to, when the message is a 
CloudEvent. Used only when `indexName` is not set.
           type: string
+      types:
+        json:
+          format: "application-json"
+          description: "The document, as JSON text in bytes."
+          mediaType: application/json
   types:
     out:
       mediaType: text/plain
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/mariadb-sink.kamelet.yaml 
b/library/camel-kamelets/src/main/resources/kamelets/mariadb-sink.kamelet.yaml
index 2ab128fb5..533e2323b 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/mariadb-sink.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/mariadb-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -109,6 +109,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/mysql-sink.kamelet.yaml 
b/library/camel-kamelets/src/main/resources/kamelets/mysql-sink.kamelet.yaml
index d6013247f..16d6fa58b 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/mysql-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/mysql-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -109,6 +109,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/opensearch-index-sink.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/opensearch-index-sink.kamelet.yaml
index a96c59ef8..7982862dc 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/opensearch-index-sink.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/opensearch-index-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is the document, as JSON text, such as `{"order": 42, 
"status": "shipped"}`. The optional `indexId` header (or `ce-indexid`) is the 
id of the document: a document with the same id is replaced. Without it, 
OpenSearch makes up a new id, so each message adds a new document. The optional 
`indexName` header (or `ce-indexname`) is the index to write to, instead of the 
`indexName` option.
 
-      Output: when it is used inside a route, the body afterwards is the id of 
the document, as text.
+      Output: when it is used inside a route, the body afterwards is the id of 
the document, as text. The `Content-Type` header is set to `application/json`.
 
       Good to know: a body that is not JSON fails the message, and so does a 
message with no index, from the option or the header. It connects with TLS by 
default (`enableSSL`). For a cluster whose certificate is self-signed, or 
signed by a private certificate authority (CA), give the certificate of that CA 
in `certificate`; without it, the message fails with `PKIX path building 
failed`. When OpenSearch does not answer, the message fails after 30 seconds; 
`connectionTimeout` and `socketT [...]
     required:
@@ -99,6 +99,7 @@ spec:
         example: 10000
   dataTypes:
     in:
+      default: json
       headers:
         indexId:
           title: Document ID
@@ -116,6 +117,11 @@ spec:
           title: Index Name (CloudEvents)
           description: The index to write to, when the message is a 
CloudEvent. Used only when `indexName` is not set.
           type: string
+      types:
+        json:
+          format: "application-json"
+          description: "The document, as JSON text in bytes."
+          mediaType: application/json
   types:
     out:
       mediaType: text/plain
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/oracle-database-sink.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/oracle-database-sink.kamelet.yaml
index 5e6249d16..1b3745dde 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/oracle-database-sink.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/oracle-database-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -104,6 +104,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/postgresql-sink.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/postgresql-sink.kamelet.yaml
index fe04500d6..b785166af 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/postgresql-sink.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/postgresql-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -109,6 +109,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/solr-sink.kamelet.yaml 
b/library/camel-kamelets/src/main/resources/kamelets/solr-sink.kamelet.yaml
index 165c00052..d4c68074c 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/solr-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/solr-sink.kamelet.yaml
@@ -101,6 +101,14 @@ spec:
   types:
     in:
       mediaType: application/json
+  dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One document as a JSON object, or several as a JSON 
array, as JSON text in bytes."
+          mediaType: application/json
   dependencies:
   - "camel:solr"
   - "camel:jackson3"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml
index cd355a3e1..acc82b42e 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml
@@ -37,7 +37,7 @@ spec:
 
       Input: the body is one JSON object, as text, such as 
`{"username":"oscerd","city":"Rome"}`. In `query`, write `:#username` where the 
value of the field `username` goes. When the object has no field of that name, 
the header of that name is used instead. Fields that `query` does not name are 
ignored. When `batch` is true, the body can also be a JSON array of such 
objects, and `query` runs once for each of them.
 
-      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number.
+      Output: the body afterwards is the JSON object as a Map, and the 
`CamelSqlUpdateCount` header holds the number of rows the statement changed. 
For a JSON array with `batch`, the body is a List of Maps, and the header holds 
the total for all of them. When `query` is a SELECT, the body is instead a List 
of the rows found, each a Map, and the `CamelSqlRowCount` header holds their 
number. The `Content-Type` header is set to `application/json`.
 
       Good to know: a message fails when its body is not a JSON object (plain 
text, for example, or a JSON array when `batch` is not true), or when it has no 
value for a parameter of `query`. With `batch`, all the rows of one message are 
written in one transaction: when one of them fails, none is written. The values 
are sent to the database apart from the SQL text, so the content of a message 
cannot change the statement. Do not write `?` in `query`, not even in a quoted 
string: the Kamel [...]
     required:
@@ -114,6 +114,13 @@ spec:
     in:
       mediaType: application/json
   dataTypes:
+    in:
+      default: json
+      types:
+        json:
+          format: "application-json"
+          description: "One JSON object, or with `batch` a JSON array of 
objects, as JSON text in bytes."
+          mediaType: application/json
     out:
       headers:
         CamelSqlUpdateCount:
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/database/mariadb/mariadb-sink-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/database/mariadb/mariadb-sink-route.citrus.it.yaml
index 617e1d640..3aa00db94 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/database/mariadb/mariadb-sink-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/database/mariadb/mariadb-sink-route.citrus.it.yaml
@@ -68,7 +68,7 @@ actions:
             - name: "X-Body-Type"
               value: 'java.util.LinkedHashMap'
             - name: "X-Content-Type"
-              value: 'ct='
+              value: 'ct=application/json'
             - name: "X-Update-Count"
               value: '1'
           body:
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/database/mysql/mysql-sink-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/database/mysql/mysql-sink-route.citrus.it.yaml
index 5de184f05..183552ab2 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/database/mysql/mysql-sink-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/database/mysql/mysql-sink-route.citrus.it.yaml
@@ -68,7 +68,7 @@ actions:
             - name: "X-Body-Type"
               value: 'java.util.LinkedHashMap'
             - name: "X-Content-Type"
-              value: 'ct='
+              value: 'ct=application/json'
             - name: "X-Update-Count"
               value: '1'
           body:
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/database/oracle/oracle-database-sink-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/database/oracle/oracle-database-sink-route.citrus.it.yaml
index 3866eee7c..a764690c9 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/database/oracle/oracle-database-sink-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/database/oracle/oracle-database-sink-route.citrus.it.yaml
@@ -76,7 +76,7 @@ actions:
             - name: "X-Body-Type"
               value: 'java.util.LinkedHashMap'
             - name: "X-Content-Type"
-              value: 'ct='
+              value: 'ct=application/json'
             - name: "X-Update-Count"
               value: '1'
           body:
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/database/sqlserver/sqlserver-sink-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/database/sqlserver/sqlserver-sink-route.citrus.it.yaml
index 89ce45013..5adaf82e4 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/database/sqlserver/sqlserver-sink-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/database/sqlserver/sqlserver-sink-route.citrus.it.yaml
@@ -80,7 +80,7 @@ actions:
             - name: "X-Body-Type"
               value: 'java.util.LinkedHashMap'
             - name: "X-Content-Type"
-              value: 'ct='
+              value: 'ct=application/json'
             - name: "X-Update-Count"
               value: '1'
           body:
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/elasticsearch/elasticsearch-index-sink-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/elasticsearch/elasticsearch-index-sink-route.citrus.it.yaml
index fa0313288..df4576f0a 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/elasticsearch/elasticsearch-index-sink-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/elasticsearch/elasticsearch-index-sink-route.citrus.it.yaml
@@ -64,7 +64,7 @@ actions:
             - name: "X-Body-Type"
               value: 'java.lang.String'
             - name: "X-Content-Type"
-              value: 'ct='
+              value: 'ct=application/json'
           body:
             data: 'order-1'
   - http:
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/opensearch/opensearch-index-sink-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/opensearch/opensearch-index-sink-route.citrus.it.yaml
index 8b3d158dd..9b6fd9823 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/opensearch/opensearch-index-sink-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/opensearch/opensearch-index-sink-route.citrus.it.yaml
@@ -66,7 +66,7 @@ actions:
             - name: "X-Body-Type"
               value: 'java.lang.String'
             - name: "X-Content-Type"
-              value: 'ct='
+              value: 'ct=application/json'
           body:
             data: 'order-1'
   - http:
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/postgres/postgresql-sink-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/postgres/postgresql-sink-route.citrus.it.yaml
index 3a0e96052..7a8b24eb6 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/postgres/postgresql-sink-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/postgres/postgresql-sink-route.citrus.it.yaml
@@ -43,3 +43,10 @@ actions:
         verify:
           integration: "postgresql-sink-route"
           logMessage: "from-sink"
+
+  # The INSERT ran: the body is the JSON object as a Map, and Content-Type is 
the application/json of the input
+  - camel:
+      cli:
+        verify:
+          integration: "postgresql-sink-route"
+          logMessage: "after-sink body-type=java.util.LinkedHashMap 
ct=application/json count=1"
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/postgres/postgresql-sink-route.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/postgres/postgresql-sink-route.yaml
index 30eb4caaf..c44fb8ad3 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/postgres/postgresql-sink-route.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/postgres/postgresql-sink-route.yaml
@@ -34,3 +34,5 @@
             username: "{{postgresql.username}}"
             password: "{{postgresql.password}}"
             query: "INSERT INTO test_data (id, name, value) VALUES (:#id, 
:#name, :#value)"
+      # what the Kamelet leaves on the message: the Java type of the body, the 
Content-Type and the update count
+      - log: "after-sink body-type=${body.getClass().getName()} 
ct=${header.Content-Type} count=${header.CamelSqlUpdateCount}"

Reply via email to