[ 
https://issues.apache.org/jira/browse/CAMEL-21709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17923750#comment-17923750
 ] 

Claus Ibsen commented on CAMEL-21709:
-------------------------------------

You are welcome to work on a PR - Not sure how many tests that needs to be 
adapted, as it would all only be in camel-jbang and not elsewhere

> camel-jbang - use route as top-level attribute when creating a Camel Yaml dsl 
> route
> -----------------------------------------------------------------------------------
>
>                 Key: CAMEL-21709
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21709
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jbang
>    Affects Versions: 4.9.0
>            Reporter: Aurélien Pupier
>            Priority: Minor
>
> currently, using `jbang '-Dcamel.jbang.version=4.10.0-SNAPSHOT' 
> camel@apache/camel init demo.camel.yaml` generates:
> {noformat}
> - from:
>     uri: "timer:yaml"
>     parameters:
>       period: "1000"
>     steps:
>       - setBody:
>           simple: "Hello Camel from ${routeId}"
>       - log: "${body}"
> {noformat}
> The request is to generate:
> {noformat}
> - route:
>     from:
>       uri: timer:yaml
>       parameters:
>         period: "1000"
>       steps:
>         - setBody:
>             simple: Hello Camel from ${routeId}
>         - log: ${body}
> {noformat}
> * advantages:
> ** closer to what Kaoto and Karavan is using
> ** more in phase with xml and Java which also have route as top-level
> ** easier to write more code with ids
> * drawbacks:
> ** one more level, slightly more verbose
> ** surely a bunch of tests to adapt (in Camel, but also Kaoto, Karavan, 
> Language Server, ...)
> ** would be good to update also existing examples to  be in phase



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to