lburgazzoli commented on a change in pull request #5089:
URL: https://github.com/apache/camel/pull/5089#discussion_r576066997



##########
File path: 
core/camel-core-model/src/main/java/org/apache/camel/model/rest/VerbDefinition.java
##########
@@ -129,6 +132,15 @@ public String getLabel() {
         }
     }
 
+    @Override
+    public void addOutput(ProcessorDefinition<?> processorDefinition) {
+        if (route == null) {
+            route = new RouteDefinition();
+        }
+
+        route.addOutput(processorDefinition);
+    }

Review comment:
       Not sure if it is correct, I've opened it mainly to track the gaps I'm 
finding when working on additional DSLs. 
   
   In this specific case I'd need each definition that support output nodes, to 
be properly identifiable and the reason is that in the YAML DSL I need a way to 
apply common patterns as example:
   
   ```yaml
   - rest:
       paths:
         "/foo":
           get:
             type: com.github.lburgazzoli.camel.dsl.yaml.support.model.MyFooBar
             out-type: 
com.github.lburgazzoli.camel.dsl.yaml.support.model.MyBean
             steps:
               - to: "direct:bar"
               - log: "${body}"
   ```            
   
   The auto generated DSL parser is able to automatically handle the `steps` 
property, but since the `VerbDefinition` is not market as an `OutputNode`, it 
does not know how to attach such steps to the definition, hence I've added this 
method and related interfaces.
   




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to