davsclaus commented on code in PR #28446:
URL: https://github.com/apache/camel/pull/28446#discussion_r4370713509


##########
components/camel-azure/camel-azure-eventgrid/src/main/java/org/apache/camel/component/azure/eventgrid/EventGridEndpoint.java:
##########
@@ -36,6 +39,14 @@
              syntax = "azure-eventgrid:topicEndpoint", producerOnly = true, 
category = {
                      Category.CLOUD, Category.MESSAGING },
              headersClass = EventGridConstants.class)
+@BodyTypes(producerIn = @BodyType(value = { Carrier.MAP, Carrier.POJO, 
Carrier.LIST },
+                                  description = "The data of the event, 
serialized to JSON by the Azure SDK: a Map or a POJO"
+                                                + " becomes a JSON object and 
a number a JSON number. Text becomes a JSON string"
+                                                + " and is not parsed, so 
unmarshal JSON text first; bytes become a base64 string,"
+                                                + " a stream an empty object 
and a file its path. A List is sent as one event per"
+                                                + " element, and no body 
fails"),

Review Comment:
   Kept as it is on purpose: "and no body fails" is the wording of the 
body-type descriptions of 59 other components on main (alibaba-mns, 
aws-parameter-store, ...), so eventgrid reads the same as the rest. It means a 
missing body fails the send. If the phrase should change, it should change for 
all of them in one sweep, not here.
   
   _Claude Code on behalf of davsclaus_



##########
catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-eventgrid.json:
##########
@@ -39,6 +39,10 @@
     "CamelAzureEventGridEventTime": { "index": 2, "kind": "header", 
"displayName": "", "group": "producer", "label": "", "required": false, 
"javaType": "OffsetDateTime", "deprecated": false, "deprecationNote": "", 
"autowired": false, "secret": false, "description": "The time the event was 
generated.", "constantName": 
"org.apache.camel.component.azure.eventgrid.EventGridConstants#EVENT_TIME" },
     "CamelAzureEventGridId": { "index": 3, "kind": "header", "displayName": 
"", "group": "producer", "label": "", "required": false, "javaType": "String", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The unique identifier for the event.", "constantName": 
"org.apache.camel.component.azure.eventgrid.EventGridConstants#ID" }
   },
+  "bodyTypes": {
+    "producerIn": { "carriers": [ "map", "pojo", "list" ], "description": "The 
data of the event, serialized to JSON by the Azure SDK: a Map or a POJO becomes 
a JSON object and a number a JSON number. Text becomes a JSON string and is not 
parsed, so unmarshal JSON text first; bytes become a base64 string, a stream an 
empty object and a file its path. A List is sent as one event per element, and 
no body fails" },

Review Comment:
   Same as the Java annotation: the generated catalog keeps the shared wording.
   
   _Claude Code on behalf of davsclaus_



-- 
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