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

   _Claude Code on behalf of davsclaus_
   
   [CAMEL-26285](https://issues.apache.org/jira/browse/CAMEL-26285)
   
   milvus, qdrant, weaviate, pgvector and neo4j took the action only from a 
header (`CamelMilvusAction`, `CamelQdrantAction`, `CamelWeaviateAction`, 
`CamelPgVectorAction`, `CamelNeo4jOperation`). Without it the producer failed, 
so a route had to set the header before every call: `milvus:docs?action=SEARCH` 
was not possible.
   
   **Changes**
   - A new `action` endpoint option for milvus, qdrant, weaviate and pgvector, 
and `operation` for neo4j, as pinecone has had since CAMEL-21796. The header, 
when set, still wins over the option, so existing routes and one endpoint for 
several actions keep working. Without either, the producer fails with 
`NoSuchHeaderException` as before; its message now names the option too.
   - Catalog body types per action with `byOption`: the carriers and the fully 
qualified Java type of the body each action takes and gives, such as 
`io.milvus.param.dml.InsertParam` in and `io.milvus.grpc.MutationResult` out 
for milvus INSERT, or 
`java.util.List<io.qdrant.client.grpc.Points.ScoredPoint>` for qdrant 
SIMILARITY_SEARCH. Before, milvus and qdrant were `pojo` with the class names 
only in the description.
   - The milvus:embeddings and weaviate:embeddings data type transformers run 
before the endpoint, so they cannot see its option: they still read the header, 
and without it now fail with a message that says so instead of a 
NullPointerException.
   - The doc pages describe the option. Regenerated: component JSON, catalog, 
endpoint and component DSL.
   
   **Tests**
   - New `MilvusActionOptionTest`, `QdrantActionOptionTest`, 
`PgVectorActionOptionTest`, `Neo4jOperationOptionTest` (no server: a stub 
client or DataSource, or an action that fails on its body type before it calls 
the server) and `WeaviateActionOptionIT` (the weaviate client connects when the 
producer starts, so this one runs against the test-infra container): the option 
selects the action, the header wins over it, and neither fails.
   - The existing tests and ITs of the five modules pass against their 
test-infra containers (qdrant 26, milvus 21, pgvector 17, neo4j 24, weaviate 
16; `WeaviateComponentIT` skips without an API key, as before).
   - Local check: catalog 1105 tests, yaml-dsl-validator 295, camel-jbang-core 
2428 + 241, no regeneration drift.
   
   🤖 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