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 7dd2c5982cfd CAMEL-27475: camel-core - the text-plain and 
application-octet-stream data types say their format (text, binary) in the 
catalog (#30677)
7dd2c5982cfd is described below

commit 7dd2c5982cfd8cb3bd246cfe5e08dcd0072ece39
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Nov 23 18:34:25 2026 +0100

    CAMEL-27475: camel-core - the text-plain and application-octet-stream data 
types say their format (text, binary) in the catalog (#30677)
    
    The body types of a data type transformer give the format of its output,
    as application-json (json), avro-binary and protobuf-binary (binary) do.
    text-plain and application-octet-stream, the text and binary data types of
    the Kamelets, had none: they now say text and binary, the names the
    catalog and the Kamelet data types use, and camel doc prints them
    ("text or null, as text").
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .../org/apache/camel/catalog/transformers/application-octet-stream.json | 1 +
 .../resources/org/apache/camel/catalog/transformers/text-plain.json     | 1 +
 .../services/org/apache/camel/transformer/application-octet-stream.json | 1 +
 .../META-INF/services/org/apache/camel/transformer/text-plain.json      | 1 +
 .../camel/processor/transformer/ByteArrayDataTypeTransformer.java       | 1 +
 .../apache/camel/processor/transformer/StringDataTypeTransformer.java   | 2 +-
 6 files changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/transformers/application-octet-stream.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/transformers/application-octet-stream.json
index 38d52fb8f03c..5ac15324c222 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/transformers/application-octet-stream.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/transformers/application-octet-stream.json
@@ -27,6 +27,7 @@
         "file",
         "null"
       ],
+      "format": "binary",
       "description": "A stream cache or a file body is kept as it is and a 
null body stays null; any other body becomes a byte array"
     }
   }
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/transformers/text-plain.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/transformers/text-plain.json
index 44e16f27ed66..4d941f489559 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/transformers/text-plain.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/transformers/text-plain.json
@@ -27,6 +27,7 @@
         "null"
       ],
       "javaType": "java.lang.String",
+      "format": "text",
       "description": "A String, or null for a null body"
     }
   }
diff --git 
a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/transformer/application-octet-stream.json
 
b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/transformer/application-octet-stream.json
index 38d52fb8f03c..5ac15324c222 100644
--- 
a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/transformer/application-octet-stream.json
+++ 
b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/transformer/application-octet-stream.json
@@ -27,6 +27,7 @@
         "file",
         "null"
       ],
+      "format": "binary",
       "description": "A stream cache or a file body is kept as it is and a 
null body stays null; any other body becomes a byte array"
     }
   }
diff --git 
a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/transformer/text-plain.json
 
b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/transformer/text-plain.json
index 44e16f27ed66..4d941f489559 100644
--- 
a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/transformer/text-plain.json
+++ 
b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/transformer/text-plain.json
@@ -27,6 +27,7 @@
         "null"
       ],
       "javaType": "java.lang.String",
+      "format": "text",
       "description": "A String, or null for a null body"
     }
   }
diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/transformer/ByteArrayDataTypeTransformer.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/transformer/ByteArrayDataTypeTransformer.java
index ca3be6016b67..94e642415139 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/transformer/ByteArrayDataTypeTransformer.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/transformer/ByteArrayDataTypeTransformer.java
@@ -41,6 +41,7 @@ import org.apache.camel.spi.Transformer;
                                      description = "A body Camel can convert 
to a byte array: a number fails, and a null"
                                                    + " body stays null"),
            transformerOut = @BodyType(value = { Carrier.BYTES, Carrier.STREAM, 
Carrier.FILE, Carrier.NULL },
+                                      format = "binary",
                                       description = "A stream cache or a file 
body is kept as it is and a null body"
                                                     + " stays null; any other 
body becomes a byte array"))
 public class ByteArrayDataTypeTransformer extends Transformer {
diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/transformer/StringDataTypeTransformer.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/transformer/StringDataTypeTransformer.java
index 99b0b5d6403b..ad85daad10a3 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/transformer/StringDataTypeTransformer.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/transformer/StringDataTypeTransformer.java
@@ -39,7 +39,7 @@ import org.apache.camel.spi.Transformer;
                                      description = "Text, bytes, a stream, a 
file or a value such as a number, and a"
                                                    + " null body stays null; a 
Map, a List or an object would become"
                                                    + " its toString()"),
-           transformerOut = @BodyType(value = { Carrier.TEXT, Carrier.NULL }, 
javaType = "java.lang.String",
+           transformerOut = @BodyType(value = { Carrier.TEXT, Carrier.NULL }, 
javaType = "java.lang.String", format = "text",
                                       description = "A String, or null for a 
null body"))
 public class StringDataTypeTransformer extends Transformer {
 

Reply via email to