You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/02/16 09:30:08 UTC

[GitHub] [camel-k-runtime] lburgazzoli edited a comment on issue #631: Optional parameters in Kamelet route templates

lburgazzoli edited a comment on issue #631:
URL: https://github.com/apache/camel-k-runtime/issues/631#issuecomment-779704369


   This is not a route template issue in reality but a generic camel one, as in fact the from is translated to: 
   
       from: "paho:the-topic?clientId={{clientId}}&brokerUrl=the-url"
   
   So when the endpoint get resolved, then the property must be there. An option is to use default values, as example:
   
   ```yaml
   from:
     uri: paho:the-topic
     parameters:
       clientId: "{{clientId:defaultId}}"
       brokerUrl: "the-url"
   ```
   
   but maybe we also need to introduce an way to explicit mark some properties as optional, maybe with a a new property function like `{{optional:nameOfTheProperty}}` and or have a way to use simple language to set defaults, like `{{optional:nameOfTheProperty:${uuid}}}`
   
   /cc @davsclaus @valdar 
       
   


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

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