Claus Ibsen created CAMEL-26267:
-----------------------------------

             Summary: camel-huaweicloud-iam - updateUser and updateGroup fail 
on a JSON body given as bytes or stream, and the output JSON uses other field 
names than dms
                 Key: CAMEL-26267
                 URL: https://issues.apache.org/jira/browse/CAMEL-26267
             Project: Camel
          Issue Type: Bug
            Reporter: Claus Ibsen
             Fix For: 4.24.0


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

h4. 1. A JSON body as bytes or stream fails

{{IAMProducer.updateUser}} (main 2a465aa4814c, lines 144-158) and 
{{updateGroup}} (lines 220-224) accept the SDK option object or a String only; 
JSON as byte[] or stream fails. 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 parsing.

h4. 2. The output JSON uses the SDK's Java field names

The responses are written with Gson ({{gson.toJson(...)}}, lines 111-251), 
which uses the Java field names (e.g. {{domainId}}), while 
camel-huaweicloud-dms writes the API's snake_case names; users of both cannot 
map them the same way. Checked on 4.24.0-SNAPSHOT with a mock SDK client set on 
the endpoint.

Proposed: use the SDK's Jackson mapping (the API names), and note it in the 
upgrade guide.

_Claude Code on behalf of davsclaus_



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

Reply via email to