Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.20.4
-
None
-
Unknown
Description
Currently, when calling jbang run '-Dcamel.jbang.version=3.20.3' camel@apache/camel init 'demo.xml' the generated file is:
<?xml version="1.0" encoding="UTF-8"?> <!-- camel-k: language=xml --> <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://camel.apache.org/schema/spring https://camel.apache.org/schema/spring/camel-spring.xsd"> <!-- Write your routes here, for example: --> <route id="xml"> <from uri="timer:xml?period={{time:1000}}"/> <setBody> <simple>Hello Camel from ${routeId}</simple> </setBody> <log message="${body}"/> </route> </routes>
it woudl be nice to have something like:
<?xml version="1.0" encoding="UTF-8"?> <!-- camel-k: language=xml --> <routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://camel.apache.org/schema/spring" xsi:schemaLocation=" http://camel.apache.org/schema/spring https://camel.apache.org/schema/spring/camel-spring.xsd"> <!-- Write your routes here, for example: --> <route id="demo"> <from uri="timer:xml?period={{time:1000}}"/> <setBody> <simple>Hello Camel from ${routeId}</simple> </setBody> <log message="${body}"/> </route> </routes>
It will mitigate the risk of having route id clash later on during development phase.
Alternatively we might use demo-xml