[
https://issues.apache.org/jira/browse/CAMEL-27327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151576#comment-18151576
]
Claus Ibsen commented on CAMEL-27327:
-------------------------------------
[~ayushkul2005] thanks for offering to work on this. In the CAMEL project,
tickets are assigned to contributors once they have been active for a while and
have a track record here, so we can't assign it to you yet.
You don't need the assignment to start: write a comment on the ticket saying
that you work on it (as you did), and open the PR when it is ready. The comment
and the PR show the others that it is taken.
_Claude Code on behalf of davsclaus_
> camel-mongodb - read InputStream and StreamCache List bodies as text, and
> accept a JSON array with surrounding whitespace
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27327
> URL: https://issues.apache.org/jira/browse/CAMEL-27327
> Project: Camel
> Issue Type: Improvement
> Components: camel-mongodb
> Reporter: Ayush Kulshreshtha
> Priority: Minor
>
> Follow-up of CAMEL-27194 (https://github.com/apache/camel/pull/30514), from
> the review by Claus Ibsen.
> 1. The update (without the CamelMongoDbCriteria header), findOneAndUpdate and
> aggregate operations read their List body through
> MongoDbProducer.getBsonListBody, which reads a byte[] body as text since
> CAMEL-27194. An InputStream or StreamCache body, for example from
> platform-http, is not read as text, while the single-document path accepts
> InputStream and File through the existing converters. Read these bodies as
> text in the same helper.
> 2. MongoDbBasicConverters.isArrayNotation requires "[" and "]" at the very
> start and end, so a JSON array from a file or a Kafka record that ends in a
> newline is not seen as an array. Trim the text before the check.
> 3. Docs: the update section of mongodb-component.adoc describes the body only
> as a List<Bson>, and aggregate is marked "Java-only: requires Bson
> aggregation pipeline". A JSON array as text works for both now, which makes
> them usable from YAML and XML routes. Add a short note, and regenerate the
> catalog copy.
> _Claude Code on behalf of Ayush0612005_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)