You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mitch Trachtenberg <mj...@gmail.com> on 2024/02/27 19:14:25 UTC
yaml blocks
I'm working off of mods to a camel spring boot example, and running into
confusion in yaml files. I'm using Camel 4.3 and Spring Boot 3.2.2, and I
am feeding a minimal Java program with a route via yaml. When the yaml
file does not include the first line below, "*routes:*" and there is no
indent before "- route:" all is well. But when I modify it to create a
"routes:" block, the route is not loaded. My hope is to have a routes
block, a beans block, and a routeConfiguration block. Any suggestions
appreciated. Thanks.
*routes:*
- route:
id: timerDemo
from:
uri: timer:myTimer?fixedRate=true&period=5000
steps:
- setBody:
simple: "Hello from the timer!"
- to:
uri: log:myLog?level=INFO&showAll=true&multiline=true
Re: yaml blocks
Posted by Mitch Trachtenberg <mj...@gmail.com>.
Thank you, Luca!
On Tue, Feb 27, 2024 at 11:38 AM Luca Burgazzoli <lb...@gmail.com>
wrote:
> At this stage, the YAML Dsl does not have any pre-defined structure or set
> of blocks but it is just an array of objects.
> You can fine the json schema for the DSL in the JSON Schema Store [1] or in
> the Camel repository [2]
>
> [1] https://www.schemastore.org/json/
> [2]
>
> https://raw.githubusercontent.com/apache/camel/main/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
>
> ---
> Luca Burgazzoli
>
>
> On Tue, Feb 27, 2024 at 8:14 PM Mitch Trachtenberg <mj...@gmail.com>
> wrote:
>
> > I'm working off of mods to a camel spring boot example, and running into
> > confusion in yaml files. I'm using Camel 4.3 and Spring Boot 3.2.2, and
> I
> > am feeding a minimal Java program with a route via yaml. When the yaml
> > file does not include the first line below, "*routes:*" and there is no
> > indent before "- route:" all is well. But when I modify it to create a
> > "routes:" block, the route is not loaded. My hope is to have a routes
> > block, a beans block, and a routeConfiguration block. Any suggestions
> > appreciated. Thanks.
> >
> > *routes:*
> > - route:
> > id: timerDemo
> > from:
> > uri: timer:myTimer?fixedRate=true&period=5000
> > steps:
> > - setBody:
> > simple: "Hello from the timer!"
> > - to:
> > uri: log:myLog?level=INFO&showAll=true&multiline=true
> >
>
Re: yaml blocks
Posted by Luca Burgazzoli <lb...@gmail.com>.
At this stage, the YAML Dsl does not have any pre-defined structure or set
of blocks but it is just an array of objects.
You can fine the json schema for the DSL in the JSON Schema Store [1] or in
the Camel repository [2]
[1] https://www.schemastore.org/json/
[2]
https://raw.githubusercontent.com/apache/camel/main/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
---
Luca Burgazzoli
On Tue, Feb 27, 2024 at 8:14 PM Mitch Trachtenberg <mj...@gmail.com> wrote:
> I'm working off of mods to a camel spring boot example, and running into
> confusion in yaml files. I'm using Camel 4.3 and Spring Boot 3.2.2, and I
> am feeding a minimal Java program with a route via yaml. When the yaml
> file does not include the first line below, "*routes:*" and there is no
> indent before "- route:" all is well. But when I modify it to create a
> "routes:" block, the route is not loaded. My hope is to have a routes
> block, a beans block, and a routeConfiguration block. Any suggestions
> appreciated. Thanks.
>
> *routes:*
> - route:
> id: timerDemo
> from:
> uri: timer:myTimer?fixedRate=true&period=5000
> steps:
> - setBody:
> simple: "Hello from the timer!"
> - to:
> uri: log:myLog?level=INFO&showAll=true&multiline=true
>