You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/01/18 15:13:40 UTC

[camel-k] branch main updated: Add TIP for optional prop placeholder for non-req param

This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/main by this push:
     new cdb779a96 Add TIP for optional prop placeholder for non-req param
cdb779a96 is described below

commit cdb779a961ba180cf7a12b527b0e1cc337139782
Author: Matteo Mortari <ma...@gmail.com>
AuthorDate: Wed Jan 18 10:10:39 2023 +0100

    Add TIP for optional prop placeholder for non-req param
    
    adding TIP for optional property placeholder syntax for non-required parameter
    which does not not define a default value in the Kamelet's `spec.definition.properties`.
---
 docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc b/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
index 6e52c598d..c54271ac1 100644
--- a/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
+++ b/docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
@@ -762,6 +762,8 @@ spec:
 <2> Definition of the period parameter (used with the `{\{period}}` placeholder in the route)
 <3> Definition of the lookAhead parameter
 
+TIP: In other scenarios, you might want to refer to non-required parameters in the Kamelet's `spec.template` using the `{{?optionalParam}}` syntax; that might be helpful for those cases where the non-required parameter does not define a default value in the Kamelet's `spec.definition.properties`. For more information, you can refer to the Camel property placeholder syntax in the https://camel.apache.org/manual/using-propertyplaceholder.html#_using_optional_property_placeholders[Camel manual].
+
 === Step 7: add metadata and sugar
 
 We should complete the Kamelet with all mandatory (also optional) options that are described in https://github.com/apache/camel-kamelets[the guidelines for contributing Kamelets].