jeejz commented on code in PR #4178:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4178#discussion_r2793279980


##########
quarkus/addons/asyncapi/deployment/src/main/java/org/kie/kogito/quarkus/serverless/workflow/asyncapi/AsyncAPIInfoConverter.java:
##########
@@ -48,19 +51,57 @@ public Optional<AsyncInfo> apply(String id) {
 
     private static AsyncInfo from(AsyncAPI asyncApi) {
         Map<String, AsyncChannelInfo> map = new HashMap<>();
-        for (Entry<String, ChannelItem> entry : 
asyncApi.getChannels().entrySet()) {
-            addChannel(map, entry.getValue().getPublish(), entry.getKey() + 
"_out", true);
-            addChannel(map, entry.getValue().getSubscribe(), entry.getKey(), 
false);
+
+        // AsyncAPI v3.0.0 migration: In v3, channels and operations are 
separate top-level objects
+        // v2: channels contained publish/subscribe operations directly
+        // v3: operations reference channels via $ref, and channels have 
addresses
+        // Build a helper map: channelId -> address (topic/path)
+        Map<String, String> channelIdToAddress = new HashMap<>();
+        if (asyncApi.getChannels() != null) {
+            for (Entry<String, Object> ch : asyncApi.getChannels().entrySet()) 
{
+                String channelId = ch.getKey();
+                if (ch.getValue() instanceof Channel) {
+                    Channel channel = (Channel) ch.getValue();

Review Comment:
   @fjtirado  this is addressed. Please review.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to