[ 
https://issues.apache.org/jira/browse/CAMEL-27271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on CAMEL-27271 started by Claus Ibsen.
-------------------------------------------
> camel-jackson, avro and protobuf - keep a more specific media type: 
> application-json keeps a +json Content-Type, avro-binary and protobuf-binary 
> keep bytes that are serialized already
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-27271
>                 URL: https://issues.apache.org/jira/browse/CAMEL-27271
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jackson, camel-jackson-avro
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> A Kamelet that gives a more specific media type cannot declare an out data 
> type today, as the data type replaces it:
> * {{application-json}} always sets {{Content-Type: application/json}}, so the 
> {{application/fhir+json}} of {{fhir-source}} or the {{application/geo+json}} 
> of {{ogcapi-features-action}} is lost.
> * {{avro-binary}} and {{protobuf-binary}} need the schema exchange property, 
> read bytes that are Avro or Protobuf already, write them again, and set 
> {{avro/binary}} or {{protobuf/binary}}: the {{application/avro}} and 
> {{application/protobuf}} that {{avro-serialize-action}} and 
> {{protobuf-serialize-action}} set after their marshal are lost.
> Fix:
> * {{application-json}} keeps an existing {{application/*+json}} Content-Type, 
> and (with CAMEL-27270) keeps a Json value given as text with it too.
> * {{avro-binary}} keeps a byte array or stream body whose Content-Type is 
> {{application/avro}} or {{avro/binary}} as it is, with that Content-Type and 
> without the schema; {{protobuf-binary}} does the same for 
> {{application/protobuf}} and {{protobuf/binary}}. Other bodies are serialized 
> as before.
> Both Jackson 2 and Jackson 3 modules. 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