Claus Ibsen created CAMEL-26285:
-----------------------------------
Summary: camel-catalog: body types by the value of a header, with
the Java type of each, such as the action of milvus
Key: CAMEL-26285
URL: https://issues.apache.org/jira/browse/CAMEL-26285
Project: Camel
Issue Type: Improvement
Components: camel-catalog
Reporter: Claus Ibsen
Assignee: Claus Ibsen
Fix For: 4.24.0
The catalog body types (CAMEL-24961) give the Java type of a body with
{{javaType}}, also per value of an endpoint option with {{byOption}}, such as
{{operation=putObject}}. Some components pick the action from a header only,
and have no option for it, so the catalog cannot say which class each action
takes and gives:
* *milvus* ({{CamelMilvusAction}}, 7 actions): producerIn and producerOut are
{{pojo}} without a {{javaType}}; the description names the SDK classes by their
simple names (CreateCollectionParam, InsertParam, SearchSimpleParam ... in;
RpcStatus, MutationResult, SearchResponse, QueryResults out).
* *qdrant* ({{CamelQdrantAction}}, 7 actions): VectorParams, PointStruct,
PointId ... in; a List of RetrievedPoint or ScoredPoint, CollectionInfo out.
* *weaviate* ({{CamelWeaviateAction}}, 11 actions): WeaviateObject,
InsertManyResponse, QueryResponse ... out.
The carriers depend on the header as well, for these and for pgvector
({{CamelPgVectorAction}}) and neo4j ({{CamelNeo4jOperation}}), so the catalog
now gives the union of the carriers of all actions.
*Proposed change*: let a body type be given per value of a header, as
{{byOption}} does for an option (a {{byHeader}} beside it, or a header in
{{@BodyType.When}}), with the carriers and the fully qualified {{javaType}} of
each value, and fill it in for milvus, qdrant, weaviate, pgvector and neo4j.
Tooling (validator, TUI, MCP) then reads it as it reads {{byOption}}. An
alternative for a component is an endpoint option for the action, as pinecone
has beside its {{CamelPineconeAction}} header, which {{byOption}} covers today.
h4. Found while looking, not part of this issue
Of the 270 component sides with the {{pojo}} carrier, 206 have no {{javaType}}.
Apart from the components above:
* *The option exists, the per-operation types are missing* (data only,
{{byOption}} covers it today): aws-config, aws-security-hub, aws2-ecs,
aws2-eks, aws2-eventbridge, aws2-iam, aws2-kms, aws2-mq, aws2-msk,
aws2-redshift-data, aws2-rekognition, aws2-step-functions, aws2-sts,
aws2-textract, aws2-timestream, aws2-transcribe, hwcloud-frs, stripe,
ibm-watsonx-data, the openstack components, and some operations of docker, git,
consul, dapr, elasticsearch, opensearch and the kubernetes components.
* *The API components* select the method by two options, apiName and
methodName, which {{byOption}} cannot key: as2, box, braintree, dhis2, fhir,
google-calendar, google-drive, google-mail, google-sheets, olingo2, olingo4,
twilio and zendesk. The return types are known from the generated API method
classes, so the build could generate them.
* *A class the user configures* (jpa and jooq entityType, grpc, thrift, cxf,
mapstruct, optaplanner, stax, hazelcast, ignite, jgroups, vertx, salesforce and
servicenow models): no {{javaType}} is right for these.
Raised on the dev list in reply to the body types work: for a Java object, the
fully qualified name is worth having, such as for milvus.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)