Claus Ibsen created CAMEL-23593:
-----------------------------------

             Summary: camel validate normalize does not handle REST DSL, 
routeConfiguration, and beans-only files
                 Key: CAMEL-23593
                 URL: https://issues.apache.org/jira/browse/CAMEL-23593
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang
            Reporter: Claus Ibsen


The {{camel validate normalize}} command cannot normalize several YAML DSL 
constructs:

* *REST DSL* — REST definitions are converted into regular routes at runtime, 
so the dump output loses the original REST DSL structure. Affects any file 
using {{- rest:}} blocks.
* *routeConfiguration* — Files using {{- routeConfiguration:}} with 
{{onException}} produce {{- routeConfigurations: \{\}}} in the output, losing 
the configuration content entirely. The onException gets incorrectly inlined 
into routes.
* *Beans-only files* — Files containing only {{- beans:}} (no routes) fail 
because the Run command needs at least one route to start up.

Examples that could not be normalized in camel-jbang-examples:
- {{rest-api/rest-api.camel.yaml}} (REST DSL)
- {{openapi/server/petstore.camel.yaml}} (REST DSL)
- {{smart-log-analyzer/ui-console/rest-api.camel.yaml}} (REST DSL)
- {{keycloak-introspection-rest/rest-api.camel.yaml}} (REST DSL + beans)
- {{keycloak-security-rest/rest-api.camel.yaml}} (REST DSL + beans)
- {{edi-x12-as2/camel/edi-x12-as2.camel.yaml}} (routeConfiguration)
- {{routes/beans.yaml}} (beans-only)



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

Reply via email to