Claus Ibsen created CAMEL-26249:
-----------------------------------

             Summary: camel-google-text-to-speech - pojoRequest=true ignores 
the operation, so listVoices synthesizes, and listVoices always filters by 
languageCode
                 Key: CAMEL-26249
                 URL: https://issues.apache.org/jira/browse/CAMEL-26249
             Project: Camel
          Issue Type: Bug
          Components: camel-google
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of google-text-to-speech 
(CAMEL-24961, PR #28404).

h4. 1. pojoRequest=true ignores the operation

{{GoogleCloudTextToSpeechProducer.process}} (main 2a465aa4814c, line 44) goes 
to {{processPojo}} whenever {{pojoRequest}} is true, and {{processPojo}} (line 
61) always calls {{synthesizeSpeech}}; {{listVoices?pojoRequest=true}} with a 
{{ListVoicesRequest}} body fails (or synthesizes). Checked on 4.24.0-SNAPSHOT 
with a Mockito mock of the {{TextToSpeechClient}}.

Proposed: dispatch on the operation first, and read a {{ListVoicesRequest}} 
body for listVoices with pojoRequest.

h4. 2. listVoices always filters by languageCode

{{languageCode}} defaults to {{en-US}} 
({{GoogleCloudTextToSpeechConfiguration}}, line 39), so the {{!= null}} check 
in {{processListVoices}} (line 110) is always true and listVoices never lists 
all voices. Checked on 4.24.0-SNAPSHOT with the mock client.

Proposed: do not apply the default language code to listVoices (only filter 
when it is set explicitly).

_Claude Code on behalf of davsclaus_



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

Reply via email to