[ 
https://issues.apache.org/jira/browse/CAMEL-27266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18147999#comment-18147999
 ] 

Claus Ibsen commented on CAMEL-27266:
-------------------------------------

Merged via https://github.com/apache/camel/pull/30471 (e7f17b85e220 on main).

_Claude Code on behalf of davsclaus_

> camel-core - the body types of the binary and text-plain data types say a 
> null body fails, but it stays null
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27266
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27266
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> The {{@BodyTypes}} of {{ByteArrayDataTypeTransformer}} 
> ({{application-octet-stream}}, {{binary}}) and {{StringDataTypeTransformer}} 
> ({{text-plain}}, {{text}}) say that a null body fails. It does not: 
> {{TypeConverterTransformer.transform}} returns early on a null body, so the 
> body stays null, and the transformer only sets the {{Content-Type}} header.
> The YAML body type validator ({{camel-yaml-dsl-validator}}) and the Camel CLI 
> read this metadata from the catalog, so their answers for a data type step, 
> or a Kamelet {{spec.dataTypes}} default, with no body are wrong.
> Fix: add the {{null}} carrier to {{transformerIn}} and {{transformerOut}} of 
> both, correct the descriptions, and regenerate the transformer metadata and 
> its catalog copy.
> Part of the data types work for the Kamelet catalog (camel-kamelets#3117, 
> CAMEL-25928).
> _Claude Code on behalf of Claus Ibsen_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to