davsclaus opened a new pull request, #28404:
URL: https://github.com/apache/camel/pull/28404

   _Claude Code on behalf of davsclaus_
   
   This group adds the catalog body types (CAMEL-24961) for twelve components:
   - the nine Google Cloud components google-bigquery, google-bigquery-sql, 
google-firestore, google-functions, google-secret-manager, 
google-speech-to-text, google-text-to-speech, google-vertexai and google-vision;
   - the vaults ibm-secrets-manager, hashicorp-vault and cyberark-vault.
   
   Each change is an `@BodyTypes` annotation on the Endpoint, plus the JSON it 
generates and the catalog copy. Two doc pages had their body text corrected.
   
   **What the catalog says now**
   
   | Component | Consumer | Producer input | Producer output |
   |---|---|---|---|
   | google-bigquery | | a Map (one row) or a List of Maps | unchanged |
   | google-bigquery-sql | | `any`: the query is on the endpoint, and a Map 
gives the `@name` parameters | a List of Maps of the rows, whose values are 
text, as BigQuery gives them; an Iterator with STREAM_LIST; a `Long` for DML |
   | google-firestore | the fields of the document as a Map, with its id and 
path in headers | a Map or JSON object text for the writes | the Map written; 
the Map or null for getDocumentById; a List of Maps for the queries; a 
`Boolean` for deleteDocument |
   | google-functions | | text, bytes or a stream for callFunction; a 
`CallFunctionRequest` with pojoRequest | the result as text; `CloudFunction` 
for the management operations |
   | google-speech-to-text | | audio as bytes, a stream or a file | the 
transcript as text |
   | google-text-to-speech | | text, bytes, a stream or a file for synthesize | 
the audio as `byte[]`; a List of `Voice` for listVoices |
   | google-vision | | an image as bytes, a stream or a file | by operation: a 
List of annotations, or the annotation object |
   | google-vertexai | | the prompt as text (or the CamelGoogleVertexAIPrompt 
header); a List for generateEmbeddings; JSON text or a Map for rawPredict | 
text; a List of chunks with streamOutputMode=chunks; a List of `Image`; a List 
of vectors |
   | google-secret-manager | | the value as text, bytes, a stream or a file for 
createSecret | the `SecretVersion`; the value as text for getSecretVersion; 
unchanged for deleteSecret |
   | ibm-secrets-manager | | text for an arbitrary secret, a Map for a kv 
secret | the id of the new secret; the value as text, a Map or the SDK object 
for getSecret |
   | hashicorp-vault | | a Map or a POJO (written as JSON) for createSecret | 
unchanged; a Map with `data` and `metadata`, or null, for getSecret; a List of 
names for listSecrets |
   | cyberark-vault | | the value for createSecret | the value as text for 
getSecret, the default; unchanged for createSecret |
   
   **Checked at runtime.** Throwaway tests, not part of the PR, sent text, 
bytes, a stream, a file, a Map, a POJO and no body. The setups:
   - **Emulators in Docker:** the BigQuery emulator (goccy) and the Firestore 
emulator.
   - **test-infra in Docker:** a Vault dev server, and Conjur with Postgres for 
cyberark-vault.
   - **gRPC mocks:** the in-process gRPC mock of the google-functions tests.
   - **Mockito mocks:** the SDK clients of speech-to-text, text-to-speech, 
vision, vertexai and secret-manager, set through the `client` option.
   - **Fake HTTP servers:** for vertexai and ibm-secrets-manager.
   
   Not run:
   - DML in google-bigquery-sql, as the emulator reports it as a SELECT;
   - google-firestore listCollections and its realtimeUpdates consumer;
   - the create and update operations of google-functions.
   
   **Choices**
   - The secret managers follow aws-secrets-manager, with one byOption per 
operation. pojoRequest is named in the description only, as for AWS.
   - speech-to-text and vision do not list text as an input: a String is sent 
as its bytes, which are not audio or an image.
   
   **Doc fixes**
   - **google-bigquery-sql:** the data type table said that INT64 gives a Long, 
FLOAT64 a Double, BOOL a Boolean, BYTES a byte[] and NUMERIC a BigDecimal. All 
of them are text at runtime, and BYTES is base64.
   - **hashicorp-vault:** getting a secret gives a Map with the fields under 
`data` and the version under `metadata`, or no body when the secret does not 
exist.
   
   **Bugs found, not fixed here.** The JIRAs, one per component, will follow.
   - **google-bigquery, google-bigquery-sql:**
     - The connectionFactory option of the component is never used; only the 
one of the endpoint is. So a factory set on the component is ignored, and a 
client is built from the default credentials of the host.
     - From the code: a DDL statement likely fails with a NullPointerException, 
as the count of affected rows is null for it.
     - From the code: for a grouped exchange, the error of a bad body is set on 
the inner exchange and lost.
   - **google-functions:**
     - callFunction with no body fails with a NullPointerException.
     - A failed call gives an empty body and no exception.
     - A Map is sent as its toString, not as JSON.
   - **google-text-to-speech:**
     - pojoRequest=true ignores the operation, so listVoices synthesizes.
     - listVoices always filters by languageCode, which defaults to en-US.
   - **google-vertexai:**
     - generateMultimodal only takes a `byte[]` or a String, so the image of a 
stream or file body is dropped, and so are bytes without the mime type header. 
Only the prompt is sent.
     - rawPredict rejects bytes, a stream or a file, so JSON from a file or an 
HTTP consumer fails.
     - Six declared headers are never used.
   - **google-secret-manager:**
     - createSecret with no body creates the secret, then fails, which leaves a 
secret without a version.
     - With pojoRequest, createSecret only adds a version.
     - A heading of the page says "Google Functions".
   - **ibm-secrets-manager:**
     - getSecret and updateSecret fail for the secret types other than 
arbitrary, kv and service_credentials.
     - createKVSecret does not take JSON text.
   - **hashicorp-vault:**
     - With cloud=true and no namespace, getSecret fails with "Path must not be 
empty", and listSecrets is empty.
     - A stream body fails with a Jackson error, and no body writes an empty 
version.
   - **cyberark-vault:**
     - From the code: with the authToken option, a 401 makes the client retry 
with the same token without end.
     - Without credentials, the producer fails with a NullPointerException.
     - A createSecret after a getSecret in the same exchange writes the value 
of the header that getSecret set, not the body.
   
   **Local checks**
   - The changed modules build, with no change to the generated files after the 
build.
   - The catalog copies equal their modules.
   - camel-catalog, camel-yaml-dsl-validator and camel-jbang-core tests pass.
   - The Endpoint and Component DSLs regenerate with no change.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to