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

Work on CAMEL-26243 started by Andrea Cosentino.
------------------------------------------------
> camel-google-sheets - spreadsheets/sheets, values and developerMetadata fail 
> with a ClassCastException, and the splitResult option has no effect
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26243
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26243
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-google-sheets
>            Reporter: Claus Ibsen
>            Assignee: Andrea Cosentino
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> Found while adding the catalog body types of google-sheets and 
> google-sheets-stream (CAMEL-24961, PR #28403).
> h4. 1. spreadsheets/sheets, spreadsheets/values and 
> spreadsheets/developerMetadata fail with a ClassCastException
> The generated {{SheetsSpreadsheetsApiMethod}} (main 2a465aa4814c, lines 36, 
> 54 and 58) lists the accessors {{Spreadsheets.developerMetadata()}}, 
> {{sheets()}} and {{values()}} as methods. They return a sub-resource, not a 
> request, so {{GoogleSheetsProducer.doInvokeMethod}} (lines 43-44) fails with 
> {{ClassCastException: ... cannot be cast to AbstractGoogleClientRequest}}; 
> the consumer ({{GoogleSheetsConsumer}}, line 41) the same. Checked on 
> 4.24.0-SNAPSHOT with a fake {{MockHttpTransport}} client set through 
> {{clientFactory}} for spreadsheets/sheets; values and developerMetadata have 
> the same pattern (read in the code). The values methods themselves are 
> reachable as the separate {{data}} API.
> Proposed: leave the sub-resource accessors out of the generated methods (or 
> exclude them in the {{pom.xml}}).
> h4. 2. The splitResult option has no effect
> The {{splitResult}} option of google-sheets (consumer, documented default 
> true: "one exchange per element") never splits anything: no google-sheets 
> method returns an array or collection ({{Spreadsheet}}, {{ValueRange}}, 
> {{BatchGetValuesResponse}}... are single model objects), so 
> {{ApiConsumerHelper.getResultsProcessed}} always sends one message. One 
> message per row needs google-sheets-stream with {{splitResults}}. Checked on 
> 4.24.0-SNAPSHOT with the fake client.
> Proposed: document that the option does nothing for google-sheets (or hide 
> it). (The default of {{AbstractApiConfiguration.splitResult}}, false where 
> true is documented, is fixed by CAMEL-26025.)
> _Claude Code on behalf of davsclaus_



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

Reply via email to