Claus Ibsen created CAMEL-26265:
-----------------------------------

             Summary: camel-huaweicloud-dms - createInstance silently ignores a 
JSON request given as byte[] or stream and builds the instance from the options
                 Key: CAMEL-26265
                 URL: https://issues.apache.org/jira/browse/CAMEL-26265
             Project: Camel
          Issue Type: Bug
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of hwcloud-dms (CAMEL-24961, PR 
#28406).

h4. 1. Only a String body counts as JSON

{{DMSProducer.createInstance}} (main 2a465aa4814c, lines 105-116) reads the 
request from a {{CreateInstanceRequestBody}} or a String body only; a JSON body 
as byte[], stream or File (from an HTTP or file consumer) is ignored without a 
warning and the instance is built from the endpoint options. {{updateInstance}} 
(lines 270-279) fails on the same bodies. Checked on 4.24.0-SNAPSHOT with a 
mock SDK client set on the endpoint.

Proposed: convert other bodies to String with the type converter before the 
JSON check.

_Claude Code on behalf of davsclaus_



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

Reply via email to