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


##########
dsl/camel-jbang/camel-jbang-core/src/generated/resources/org/apache/camel/dsl/jbang/core/commands/ai/eip-samples.json:
##########
@@ -364,6 +364,10 @@
     }
   ],
   "enrich": [
+    {
+      "source": "enrich-eip.adoc",
+      "yaml": "- route:\n    from:\n      uri: jms:queue:orders\n      
steps:\n        - enrich:\n            expression:\n              constant:\n   
             expression: jms:queue:stock\n            variableReceive: stock\n  
      - log:\n            message: \"Stock service answered for 
${header.orderId}: ${variable.stock}\"\n        - to:\n            uri: 
jms:queue:reserved\n"

Review Comment:
   💡 **Nit — triple-nested expression in catalog YAML:** The new `enrich` entry 
in the AI catalog uses an inconsistent triple-nested expression form:
   
   ```
   expression:
     constant:
       expression: jms:queue:stock
   ```
   
   The existing entries in this file use the two-level form:
   
   ```
   expression:
     constant: http:remoteserver/foo
   ```
   
   Suggest simplifying the `yaml` field to match:
   
   ```suggestion
         "yaml": "- route:\n    from:\n      uri: jms:queue:orders\n      
steps:\n        - enrich:\n            expression:\n              constant: 
jms:queue:stock\n            variableReceive: stock\n        - log:\n           
 message: \"Stock service answered for ${header.orderId}: ${variable.stock}\"\n 
       - to:\n            uri: jms:queue:reserved\n"
   ```



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