gnodet-bot commented on code in PR #28446:
URL: https://github.com/apache/camel/pull/28446#discussion_r4370704403


##########
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:
   💡 **Clarity nit:** `"and no body fails"` is ambiguous — it can be parsed as 
either _"having no body is fine"_ or _"a null body causes the send to fail"_. 
The intent appears to be the latter.
   
   Suggestion: `"a null body fails the send"`.



##########
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:
   💡 **Clarity nit:** Same wording as in the Java annotation — `"and no body 
fails"` is ambiguous. Since this is a generated file it will be fixed 
automatically once the annotation is updated.



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