You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2023/04/05 11:50:29 UTC

[GitHub] [camel-karavan] davsclaus commented on issue #511: How to configure Auto Startup in a route using Env variable?

davsclaus commented on issue #511:
URL: https://github.com/apache/camel-karavan/issues/511#issuecomment-1497355671

   Yes @mgubaidullin you can find out via camel-catalog model files, eg
   
   In camelYamlDsl.json you have
   
   ```
         "org.apache.camel.model.RouteDefinition" : {
           "type" : "object",
           "properties" : {
             "autoStartup" : {
               "type" : "boolean"
             },
   ```
   
   Then you can find out its an option on `org.apache.camel.model.RouteDefinition`, which you can find in camel-catalog and match by `javaType` as in `route.json` snippet below:
   
   ```
   {
     "model": {
       "kind": "model",
       "name": "route",
       "title": "Route",
       "description": "A Camel route",
       "deprecated": false,
       "label": "configuration",
       "javaType": "org.apache.camel.model.RouteDefinition",
   ```
   
   Then you have the correct model class, and inside its properties you can find
   
   ```
       "autoStartup": { "kind": "attribute", "displayName": "Auto Startup", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "true", "description": "Whether to auto start this route" },
   ```
   
   And see that the type is `string`. And therefore it supports what the user reported.
   
   I assume you use this kind of "indirection" anyway to find documentation (eg = description) for every EIP option. So karavan must have some code that captures this, and then you can use it to find out which options can also be a "string" where you can use property placeholders, env variables and so on.
   
   This can also happens for options that are numeric (not only for boolean)


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

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org