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


##########
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ai/CatalogDocs.java:
##########
@@ -345,12 +345,45 @@ private static JsonObject eipDoc(
             String matchedTerm) {
         String doc = includeDoc ? catalog.asciiDoc(model.getName() + "-eip") : 
null;
         JsonObject result = eipDoc(model, filter, scope, doc);
+        if (filter != null && scope != OptionScope.NONE && 
result.getIntegerOrDefault("matchedOptions", 0) == 0) {
+            putNestedOptions(catalog, model, filter, result);
+        }
         if (matchedTerm != null) {
             result.put("matchedTerm", matchedTerm);
         }
         return result;
     }
 
+    /**
+     * The options of the elements of an EIP that match the filter, when none 
of its own do: logStackTrace is an option
+     * of the redeliveryPolicy of onException, and a filter on onException 
found nothing (CAMEL-25370).
+     */
+    private static void putNestedOptions(CamelCatalog catalog, EipModel model, 
String filter, JsonObject result) {
+        JsonArray nested = new JsonArray();
+        for (BaseOptionModel opt : model.getOptions()) {
+            if (!"element".equals(opt.getKind())) {
+                continue;
+            }
+            EipModel element = catalog.eipModel(opt.getName());

Review Comment:
   Filed the two follow-ups as 
[CAMEL-25377](https://issues.apache.org/jira/browse/CAMEL-25377).
   
   _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