atiaomar1978-hub commented on code in PR #25552: URL: https://github.com/apache/camel/pull/25552#discussion_r3823724357
########## components/camel-alibaba/camel-alibaba-eventbridge/src/main/java/org/apache/camel/component/alibaba/eventbridge/constants/AlibabaEventBridgeConstants.java: ########## @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.alibaba.eventbridge.constants; + +/** + * Constants for Alibaba EventBridge payload and response dictionary keys. + */ +public final class AlibabaEventBridgeConstants { Review Comment: **Resolved — plain constants, no incorrect @Metadata** Good follow-up: payload and response dictionary keys are now plain `String` constants with class-level Javadoc, matching `OSSConstants`. This removes the prior `javaType` mismatches on `failedEntryCount` and `entryList`. ########## components/camel-alibaba/camel-alibaba-eventbridge/src/main/docs/alibaba-eventbridge-component.adoc: ########## @@ -44,13 +44,83 @@ include::partial$component-endpoint-headers.adoc[] == Usage +=== Message headers evaluated by the EventBridge producer + +[width="100%",cols="10%,10%,80%",options="header",] +|======================================================================= +|Header |Type |Description + +|`CamelAlibabaEventBridgeOperation` |`String` | Name of operation to invoke + +|`CamelAlibabaEventBridgeEventBusName` |`String` | Event bus name to publish events to (overrides the endpoint option) + +|`CamelAlibabaEventBridgeEventSource` |`String` | Event source URI (overrides the endpoint option) + +|`CamelAlibabaEventBridgeEventType` |`String` | Event type (overrides the endpoint option) + +|`CamelAlibabaEventBridgeEventSubject` |`String` | Event subject (overrides the endpoint option) + +|======================================================================= + +If any of the above headers are set, they will override their corresponding query parameter value. + +=== Message headers set by the EventBridge producer + +[width="100%",cols="10%,10%,80%",options="header",] +|======================================================================= +|Header |Type |Description + +|`CamelAlibabaEventBridgeRequestId` |`String` | Alibaba Cloud request ID returned by EventBridge + +|======================================================================= + +=== Event payload Map keys evaluated by the producer Review Comment: **Resolved — Map body schema documented** Input Map keys, response metadata structure, and String/JSON + Map + multi-event examples are all documented. Prior concern about the `source`→`eventSource` rename is mitigated since this is a Preview 4.23 component not yet released. ########## components/camel-alibaba/camel-alibaba-eventbridge/src/test/java/org/apache/camel/component/alibaba/eventbridge/PutEventsTest.java: ########## @@ -118,4 +121,86 @@ void testPutEventsWithMapBody() throws Exception { return data.contains("\"key\":\"value\""); })); } + + @Test + void testPutEventsWithListOfMapsAndSubjectAndEntryList() throws Exception { Review Comment: **Resolved — expanded test coverage** `testPutEventsWithListOfMapsAndSubjectAndEntryList` covers `eventSubject` overrides, batch `List<Map>` publishing, and full `entryList` response metadata assertions. Good AssertJ usage throughout. -- 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]
