diff --git a/src/rougail/output_doc/annotator.py b/src/rougail/output_doc/annotator.py
index 97817d652..8eb0450e5 100644
--- a/src/rougail/output_doc/annotator.py
+++ b/src/rougail/output_doc/annotator.py
@@ -175,6 +175,8 @@ class Annotator(Walk):
prop_value,
variable.version,
)
+ if isinstance(prop_value, Calculation):
+ prop_value.default_values = False
def calculation_to_information(
self,
@@ -237,6 +239,7 @@ class Annotator(Walk):
"type": "variable",
"value": value,
"ori_path": variable_path,
+ "optional": values.optional,
}
if isinstance(values, InformationCalculation):
return {
diff --git a/src/rougail/output_doc/doc.py b/src/rougail/output_doc/doc.py
index 4050a8f7c..d2ea945b5 100644
--- a/src/rougail/output_doc/doc.py
+++ b/src/rougail/output_doc/doc.py
@@ -670,14 +670,20 @@ class RougailOutputDoc(Examples):
if variable and self._is_inaccessible_user_data(variable):
msg = _("depends on an undocumented variable")
elif condition == "when_not":
- msg = _('when the variable "{0}" hasn\'t the value "{1}"')
+ if not calculation["optional"]:
+ msg = _('when the variable "{0}" hasn\'t the value "{1}"')
+ else:
+ msg = _('when the variable "{0}" is defined and hasn\'t the value "{1}"')
else:
- msg = _('when the variable "{0}" has the value "{1}"')
+ if not calculation["optional"]:
+ msg = _('when the variable "{0}" has the value "{1}"')
+ else:
+ msg = _('when the variable "{0}" is defined and has the value "{1}"')
if not isinstance(value, str):
value = dump(value)
values = msg.format(variable_path, value)
else:
- if calculation.get("optional", False):
+ if calculation["optional"]:
path = calculation["value"]
if "{{ identifier }}" in path:
if path not in self.dynamic_paths:
@@ -687,7 +693,11 @@ class RougailOutputDoc(Examples):
self.conf.forcepermissive.option(path).get()
except AttributeError:
return None
- true_msg = _('the value of the variable "{0}"')
+ if not calculation["optional"]:
+ true_msg = _('the value of the variable "{0}"')
+ else:
+ true_msg = _('the value of the variable "{0}" if it is defined')
+ print('connard ben lan ...')
hidden_msg = _("the value of an undocumented variable")
# if "{{ identifier }}" in calculation["value"] and calculation["value"] in self.dynamic_paths:
if "{{ identifier }}" in calculation["ori_path"]:
diff --git a/tests/force_optional.adoc b/tests/force_optional.adoc
index 6b1c9b62a..9ee9f00c5 100644
--- a/tests/force_optional.adoc
+++ b/tests/force_optional.adoc
@@ -21,6 +21,12 @@ My var3. +
**Hidden**: var could be hidden.
|
+**var4** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `mandatory` `__hidden__` |
+My var4. +
+**Hidden**: when the variable "a.unknown.variable" has the value "value".
+|
+
**var5** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `mandatory` |
My var5. +
@@ -48,7 +54,7 @@ My var8. +
**Choices**: the a.unknown.variable values.
|====
-== my var6
+== my var9
@@ -66,3 +72,32 @@ This family builds families dynamically.
A variable.
|====
+[cols="1a,1a"]
+|====
+| Variable | Description
+|
+
+**var_10** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `mandatory` `__hidden__` |
+My var10. +
+**Hidden**: when the variable "a.unknown.variable" has the value "val".
+|
+
+**var_11** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `mandatory` `__hidden__` |
+My var11. +
+**Hidden**: when the variable "a.unknown.variable" hasn't the value "val".
+|
+
+**var_12** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `mandatory` `__hidden__` |
+My var12. +
+**Hidden**: when the variable "a.unknown.variable" is defined and has the value "true".
+|
+
+**var_13** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `mandatory` `__hidden__` |
+My var13. +
+**Hidden**: when the variable "a.unknown.variable" has the value "true".
+|====
+
diff --git a/tests/force_optional/00_file.yml b/tests/force_optional/00_file.yml
index f6925046b..59e756e8d 100644
--- a/tests/force_optional/00_file.yml
+++ b/tests/force_optional/00_file.yml
@@ -54,8 +54,32 @@ var8:
description: the a.unknown.variable values
"var_{{ identifier }}":
- description: my var6
+ description: my var9
dynamic:
variable: a.unknown.variable
var:
description: a variable
+
+var_10:
+ description: my var10
+ hidden:
+ variable: a.unknown.variable
+ when: val
+
+var_11:
+ description: my var11
+ hidden:
+ variable: a.unknown.variable
+ when_not: val
+
+var_12:
+ description: my var12
+ hidden:
+ variable: a.unknown.variable
+ optional: true
+
+var_13:
+ description: my var13
+ hidden:
+ variable: a.unknown.variable
+ optional: false
diff --git a/tests/results/test/00_6string.adoc b/tests/results/test/00_6string.adoc
index 8cd896409..9e8e27fe0 100644
--- a/tests/results/test/00_6string.adoc
+++ b/tests/results/test/00_6string.adoc
@@ -34,5 +34,17 @@ The fifth variable. +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
The sixth variable. +
**Default**: value
+|
+
+**var7** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
+The seventh variable. +
+**Default**: 8080
+|
+
+**var8** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
+The height variable. +
+**Default**: true
|====
diff --git a/tests/results/test/00_6string.json b/tests/results/test/00_6string.json
index dc986d530..eab208563 100644
--- a/tests/results/test/00_6string.json
+++ b/tests/results/test/00_6string.json
@@ -166,5 +166,65 @@
"descriptions": [
"The sixth variable."
]
+ },
+ "var7": {
+ "type": "variable",
+ "default": {
+ "name": "Default",
+ "values": "8080"
+ },
+ "properties": [
+ {
+ "type": "type",
+ "name": "string"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "mandatory"
+ }
+ ],
+ "paths": [
+ "var7"
+ ],
+ "names": [
+ "var7"
+ ],
+ "descriptions": [
+ "The seventh variable."
+ ]
+ },
+ "var8": {
+ "type": "variable",
+ "default": {
+ "name": "Default",
+ "values": "true"
+ },
+ "properties": [
+ {
+ "type": "type",
+ "name": "string"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "mandatory"
+ }
+ ],
+ "paths": [
+ "var8"
+ ],
+ "names": [
+ "var8"
+ ],
+ "descriptions": [
+ "The height variable."
+ ]
}
}
\ No newline at end of file
diff --git a/tests/results/test/00_6string.md b/tests/results/test/00_6string.md
index e4900e2ee..dbf48197a 100644
--- a/tests/results/test/00_6string.md
+++ b/tests/results/test/00_6string.md
@@ -6,4 +6,6 @@
| **var4**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The forth variable.
**Default**: value |
| **var5**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The fifth variable.
**Default**: value |
| **var6**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The sixth variable.
**Default**: value |
+| **var7**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The seventh variable.
**Default**: 8080 |
+| **var8**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The height variable.
**Default**: true |
diff --git a/tests/results/test/00_6string.sh b/tests/results/test/00_6string.sh
index 7f807ccae..fffdd79f5 100644
--- a/tests/results/test/00_6string.sh
+++ b/tests/results/test/00_6string.sh
@@ -18,4 +18,10 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mvar6[0m │ The sixth variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: value │
+├───────────────────────────────────────┼──────────────────────────────────────┤
+│ [1mvar7[0m │ The seventh variable. │
+│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: 8080 │
+├───────────────────────────────────────┼──────────────────────────────────────┤
+│ [1mvar8[0m │ The height variable. │
+│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: true │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test/00_9default_calculation_multi_optional.adoc b/tests/results/test/00_9default_calculation_multi_optional.adoc
index aef724200..97f970dae 100644
--- a/tests/results/test/00_9default_calculation_multi_optional.adoc
+++ b/tests/results/test/00_9default_calculation_multi_optional.adoc
@@ -12,6 +12,6 @@ My_variable. +
**my_calculated_variable** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
My_calculated_variable. +
-**Default**: the value of the variable "my_variable".
+**Default**: the value of the variable "my_variable" if it is defined.
|====
diff --git a/tests/results/test/00_9default_calculation_multi_optional.json b/tests/results/test/00_9default_calculation_multi_optional.json
index 4161896b1..25be76fe1 100644
--- a/tests/results/test/00_9default_calculation_multi_optional.json
+++ b/tests/results/test/00_9default_calculation_multi_optional.json
@@ -31,7 +31,7 @@
"default": {
"name": "Default",
"values": [
- "the value of the variable \"my_variable\"."
+ "the value of the variable \"my_variable\" if it is defined."
]
},
"properties": [
diff --git a/tests/results/test/00_9default_calculation_multi_optional.md b/tests/results/test/00_9default_calculation_multi_optional.md
index a87edfa84..fc481b95e 100644
--- a/tests/results/test/00_9default_calculation_multi_optional.md
+++ b/tests/results/test/00_9default_calculation_multi_optional.md
@@ -1,5 +1,5 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **my_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | My_variable.
**Default**: val1 |
-| **my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "my_variable". |
+| **my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "my_variable" if it is defined. |
diff --git a/tests/results/test/00_9default_calculation_multi_optional.sh b/tests/results/test/00_9default_calculation_multi_optional.sh
index c63c97018..3468f9e44 100644
--- a/tests/results/test/00_9default_calculation_multi_optional.sh
+++ b/tests/results/test/00_9default_calculation_multi_optional.sh
@@ -6,5 +6,5 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mmy_calculated_variable[0m │ My_calculated_variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: the value of the variable │
-│ [1;7munique [0m [1;7m multiple [0m │ "my_variable". │
+│ [1;7munique [0m [1;7m multiple [0m │ "my_variable" if it is defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test/00_9default_calculation_multi_optional2.adoc b/tests/results/test/00_9default_calculation_multi_optional2.adoc
index aef724200..97f970dae 100644
--- a/tests/results/test/00_9default_calculation_multi_optional2.adoc
+++ b/tests/results/test/00_9default_calculation_multi_optional2.adoc
@@ -12,6 +12,6 @@ My_variable. +
**my_calculated_variable** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
My_calculated_variable. +
-**Default**: the value of the variable "my_variable".
+**Default**: the value of the variable "my_variable" if it is defined.
|====
diff --git a/tests/results/test/00_9default_calculation_multi_optional2.json b/tests/results/test/00_9default_calculation_multi_optional2.json
index 4161896b1..25be76fe1 100644
--- a/tests/results/test/00_9default_calculation_multi_optional2.json
+++ b/tests/results/test/00_9default_calculation_multi_optional2.json
@@ -31,7 +31,7 @@
"default": {
"name": "Default",
"values": [
- "the value of the variable \"my_variable\"."
+ "the value of the variable \"my_variable\" if it is defined."
]
},
"properties": [
diff --git a/tests/results/test/00_9default_calculation_multi_optional2.md b/tests/results/test/00_9default_calculation_multi_optional2.md
index a87edfa84..fc481b95e 100644
--- a/tests/results/test/00_9default_calculation_multi_optional2.md
+++ b/tests/results/test/00_9default_calculation_multi_optional2.md
@@ -1,5 +1,5 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **my_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | My_variable.
**Default**: val1 |
-| **my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "my_variable". |
+| **my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "my_variable" if it is defined. |
diff --git a/tests/results/test/00_9default_calculation_multi_optional2.sh b/tests/results/test/00_9default_calculation_multi_optional2.sh
index c63c97018..3468f9e44 100644
--- a/tests/results/test/00_9default_calculation_multi_optional2.sh
+++ b/tests/results/test/00_9default_calculation_multi_optional2.sh
@@ -6,5 +6,5 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mmy_calculated_variable[0m │ My_calculated_variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: the value of the variable │
-│ [1;7munique [0m [1;7m multiple [0m │ "my_variable". │
+│ [1;7munique [0m [1;7m multiple [0m │ "my_variable" if it is defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test/00_9default_calculation_multi_optional_default.adoc b/tests/results/test/00_9default_calculation_multi_optional_default.adoc
index aef724200..97f970dae 100644
--- a/tests/results/test/00_9default_calculation_multi_optional_default.adoc
+++ b/tests/results/test/00_9default_calculation_multi_optional_default.adoc
@@ -12,6 +12,6 @@ My_variable. +
**my_calculated_variable** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
My_calculated_variable. +
-**Default**: the value of the variable "my_variable".
+**Default**: the value of the variable "my_variable" if it is defined.
|====
diff --git a/tests/results/test/00_9default_calculation_multi_optional_default.json b/tests/results/test/00_9default_calculation_multi_optional_default.json
index 4161896b1..25be76fe1 100644
--- a/tests/results/test/00_9default_calculation_multi_optional_default.json
+++ b/tests/results/test/00_9default_calculation_multi_optional_default.json
@@ -31,7 +31,7 @@
"default": {
"name": "Default",
"values": [
- "the value of the variable \"my_variable\"."
+ "the value of the variable \"my_variable\" if it is defined."
]
},
"properties": [
diff --git a/tests/results/test/00_9default_calculation_multi_optional_default.md b/tests/results/test/00_9default_calculation_multi_optional_default.md
index a87edfa84..fc481b95e 100644
--- a/tests/results/test/00_9default_calculation_multi_optional_default.md
+++ b/tests/results/test/00_9default_calculation_multi_optional_default.md
@@ -1,5 +1,5 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **my_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | My_variable.
**Default**: val1 |
-| **my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "my_variable". |
+| **my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "my_variable" if it is defined. |
diff --git a/tests/results/test/00_9default_calculation_multi_optional_default.sh b/tests/results/test/00_9default_calculation_multi_optional_default.sh
index c63c97018..3468f9e44 100644
--- a/tests/results/test/00_9default_calculation_multi_optional_default.sh
+++ b/tests/results/test/00_9default_calculation_multi_optional_default.sh
@@ -6,5 +6,5 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mmy_calculated_variable[0m │ My_calculated_variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: the value of the variable │
-│ [1;7munique [0m [1;7m multiple [0m │ "my_variable". │
+│ [1;7munique [0m [1;7m multiple [0m │ "my_variable" if it is defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test/00_9default_calculation_optional_exists.adoc b/tests/results/test/00_9default_calculation_optional_exists.adoc
index 44087efc8..d730f859c 100644
--- a/tests/results/test/00_9default_calculation_optional_exists.adoc
+++ b/tests/results/test/00_9default_calculation_optional_exists.adoc
@@ -15,6 +15,6 @@ My_variable. +
**my_calculated_variable** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
My_calculated_variable. +
-**Default**: the value of the variable "my_variable".
+**Default**: the value of the variable "my_variable" if it is defined.
|====
diff --git a/tests/results/test/00_9default_calculation_optional_exists.json b/tests/results/test/00_9default_calculation_optional_exists.json
index 0936102ae..5b7011ad4 100644
--- a/tests/results/test/00_9default_calculation_optional_exists.json
+++ b/tests/results/test/00_9default_calculation_optional_exists.json
@@ -41,7 +41,7 @@
"type": "variable",
"default": {
"name": "Default",
- "values": "the value of the variable \"my_variable\"."
+ "values": "the value of the variable \"my_variable\" if it is defined."
},
"properties": [
{
diff --git a/tests/results/test/00_9default_calculation_optional_exists.md b/tests/results/test/00_9default_calculation_optional_exists.md
index eb37bb61f..527abe64c 100644
--- a/tests/results/test/00_9default_calculation_optional_exists.md
+++ b/tests/results/test/00_9default_calculation_optional_exists.md
@@ -1,5 +1,5 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **my_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_variable.
**Default**:
- val1
- val2 |
-| **my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "my_variable". |
+| **my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "my_variable" if it is defined. |
diff --git a/tests/results/test/00_9default_calculation_optional_exists.sh b/tests/results/test/00_9default_calculation_optional_exists.sh
index 2ac630c02..a799aeb26 100644
--- a/tests/results/test/00_9default_calculation_optional_exists.sh
+++ b/tests/results/test/00_9default_calculation_optional_exists.sh
@@ -8,5 +8,5 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mmy_calculated_variable[0m │ My_calculated_variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: the value of the variable │
-│ [1;7munique [0m [1;7m multiple [0m │ "my_variable". │
+│ [1;7munique [0m [1;7m multiple [0m │ "my_variable" if it is defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test/04_5disabled_calculation_optional_default.adoc b/tests/results/test/04_5disabled_calculation_optional_default.adoc
index 85815825f..540daa786 100644
--- a/tests/results/test/04_5disabled_calculation_optional_default.adoc
+++ b/tests/results/test/04_5disabled_calculation_optional_default.adoc
@@ -9,15 +9,21 @@ A condition. +
**Default**: false
|
+**var1** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `__hidden__` |
+A first variable. +
+**Hidden**: when the variable "unknown" is defined and has the value "true".
+|
+
**var3** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `__hidden__` |
A second variable. +
-**Hidden**: when the variable "condition" has the value "true".
+**Hidden**: when the variable "condition" is defined and has the value "true".
|
**var4** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `__hidden__` |
A forth variable. +
-**Hidden**: when the variable "condition" has the value "true".
+**Hidden**: when the variable "condition" is defined and has the value "true".
|====
diff --git a/tests/results/test/04_5disabled_calculation_optional_default.json b/tests/results/test/04_5disabled_calculation_optional_default.json
index 5b72683d2..88332e43d 100644
--- a/tests/results/test/04_5disabled_calculation_optional_default.json
+++ b/tests/results/test/04_5disabled_calculation_optional_default.json
@@ -29,6 +29,33 @@
"A condition."
]
},
+ "var1": {
+ "type": "variable",
+ "properties": [
+ {
+ "type": "type",
+ "name": "string"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "hidden",
+ "annotation": "when the variable \"unknown\" is defined and has the value \"true\"."
+ }
+ ],
+ "paths": [
+ "var1"
+ ],
+ "names": [
+ "var1"
+ ],
+ "descriptions": [
+ "A first variable."
+ ]
+ },
"var3": {
"type": "variable",
"properties": [
@@ -43,7 +70,7 @@
{
"type": "property",
"name": "hidden",
- "annotation": "when the variable \"condition\" has the value \"true\"."
+ "annotation": "when the variable \"condition\" is defined and has the value \"true\"."
}
],
"paths": [
@@ -70,7 +97,7 @@
{
"type": "property",
"name": "hidden",
- "annotation": "when the variable \"condition\" has the value \"true\"."
+ "annotation": "when the variable \"condition\" is defined and has the value \"true\"."
}
],
"paths": [
diff --git a/tests/results/test/04_5disabled_calculation_optional_default.md b/tests/results/test/04_5disabled_calculation_optional_default.md
index a23e5f5bb..55914546b 100644
--- a/tests/results/test/04_5disabled_calculation_optional_default.md
+++ b/tests/results/test/04_5disabled_calculation_optional_default.md
@@ -1,6 +1,7 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **condition**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A condition.
**Default**: false |
-| **var3**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A second variable.
**Hidden**: when the variable "condition" has the value "true". |
-| **var4**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A forth variable.
**Hidden**: when the variable "condition" has the value "true". |
+| **var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A first variable.
**Hidden**: when the variable "unknown" is defined and has the value "true". |
+| **var3**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A second variable.
**Hidden**: when the variable "condition" is defined and has the value "true". |
+| **var4**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A forth variable.
**Hidden**: when the variable "condition" is defined and has the value "true". |
diff --git a/tests/results/test/04_5disabled_calculation_optional_default.sh b/tests/results/test/04_5disabled_calculation_optional_default.sh
index 4d0744198..1c2fe95eb 100644
--- a/tests/results/test/04_5disabled_calculation_optional_default.sh
+++ b/tests/results/test/04_5disabled_calculation_optional_default.sh
@@ -4,11 +4,17 @@
│ [1mcondition[0m │ A condition. │
│ [1;7m boolean [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: false │
├───────────────────────────────────────┼──────────────────────────────────────┤
+│ [1mvar1[0m │ A first variable. │
+│ [1;7m string [0m [1;7m standard [0m [1;3;7m hidden [0m │ [1mHidden[0m: when the variable "unknown" │
+│ │ is defined and has the value "true". │
+├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mvar3[0m │ A second variable. │
│ [1;7m string [0m [1;7m standard [0m [1;3;7m hidden [0m │ [1mHidden[0m: when the variable │
-│ │ "condition" has the value "true". │
+│ │ "condition" is defined and has the │
+│ │ value "true". │
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mvar4[0m │ A forth variable. │
│ [1;7m string [0m [1;7m standard [0m [1;3;7m hidden [0m │ [1mHidden[0m: when the variable │
-│ │ "condition" has the value "true". │
+│ │ "condition" is defined and has the │
+│ │ value "true". │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test/60_5family_dynamic_calc_variable_empty.adoc b/tests/results/test/60_5family_dynamic_calc_variable_empty.adoc
index 509a231d1..e6c1f5ba6 100644
--- a/tests/results/test/60_5family_dynamic_calc_variable_empty.adoc
+++ b/tests/results/test/60_5family_dynamic_calc_variable_empty.adoc
@@ -39,6 +39,6 @@ A dynamic variable.
**var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
A variable calculated. +
-**Default**: the value of the variable "dynval1.var".
+**Default**: the value of the variable "dynval1.var" if it is defined.
|====
diff --git a/tests/results/test/60_5family_dynamic_calc_variable_empty.json b/tests/results/test/60_5family_dynamic_calc_variable_empty.json
index c3a776ae7..da9db70e4 100644
--- a/tests/results/test/60_5family_dynamic_calc_variable_empty.json
+++ b/tests/results/test/60_5family_dynamic_calc_variable_empty.json
@@ -93,7 +93,7 @@
"type": "variable",
"default": {
"name": "Default",
- "values": "the value of the variable \"dynval1.var\"."
+ "values": "the value of the variable \"dynval1.var\" if it is defined."
},
"properties": [
{
diff --git a/tests/results/test/60_5family_dynamic_calc_variable_empty.md b/tests/results/test/60_5family_dynamic_calc_variable_empty.md
index 146e61e4b..d41330c87 100644
--- a/tests/results/test/60_5family_dynamic_calc_variable_empty.md
+++ b/tests/results/test/60_5family_dynamic_calc_variable_empty.md
@@ -16,5 +16,5 @@ This family builds families dynamically.
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "dynval1.var". |
+| **var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "dynval1.var" if it is defined. |
diff --git a/tests/results/test/60_5family_dynamic_calc_variable_empty.sh b/tests/results/test/60_5family_dynamic_calc_variable_empty.sh
index 6b6911c2b..4bc9f469b 100644
--- a/tests/results/test/60_5family_dynamic_calc_variable_empty.sh
+++ b/tests/results/test/60_5family_dynamic_calc_variable_empty.sh
@@ -32,5 +32,5 @@ This family builds families dynamically.
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [1mvar2[0m │ A variable calculated. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: the value of the variable │
-│ │ "dynval1.var". │
+│ │ "dynval1.var" if it is defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.adoc b/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.adoc
index 8bba30d2e..526e76b16 100644
--- a/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.adoc
+++ b/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.adoc
@@ -40,6 +40,6 @@ A variable inside dynamic family. +
**var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` |
A variable. +
-**Default**: the value of the variable "dyn_val1.var".
+**Default**: the value of the variable "dyn_val1.var" if it is defined.
|====
diff --git a/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.json b/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.json
index c0ce1ea35..5fad376d4 100644
--- a/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.json
+++ b/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.json
@@ -98,7 +98,7 @@
"type": "variable",
"default": {
"name": "Default",
- "values": "the value of the variable \"dyn_val1.var\"."
+ "values": "the value of the variable \"dyn_val1.var\" if it is defined."
},
"properties": [
{
diff --git a/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.md b/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.md
index 75cfc82d2..5a959f45e 100644
--- a/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.md
+++ b/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.md
@@ -16,5 +16,5 @@ This family builds families dynamically.
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` | A variable.
**Default**: the value of the variable "dyn_val1.var". |
+| **var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` | A variable.
**Default**: the value of the variable "dyn_val1.var" if it is defined. |
diff --git a/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.sh b/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.sh
index 51745dc77..c9dbf310b 100644
--- a/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.sh
+++ b/tests/results/test/60_5family_dynamic_variable_outside_suffix_empty.sh
@@ -32,5 +32,5 @@ This family builds families dynamically.
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [1mvar2[0m │ A variable. │
│ [1;7m string [0m [1;7m standard [0m │ [1mDefault[0m: the value of the variable │
-│ │ "dyn_val1.var". │
+│ │ "dyn_val1.var" if it is defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_examples/00_6string.md b/tests/results/test_examples/00_6string.md
index e07db21d1..68fd11f3f 100644
--- a/tests/results/test_examples/00_6string.md
+++ b/tests/results/test_examples/00_6string.md
@@ -16,4 +16,6 @@ var3: example
var4: value
var5: value
var6: value
+var7: '8080'
+var8: 'true'
```
diff --git a/tests/results/test_examples/04_5disabled_calculation_optional_default.md b/tests/results/test_examples/04_5disabled_calculation_optional_default.md
index 939b838bf..1b9fb50a3 100644
--- a/tests/results/test_examples/04_5disabled_calculation_optional_default.md
+++ b/tests/results/test_examples/04_5disabled_calculation_optional_default.md
@@ -3,6 +3,7 @@
```yaml
---
condition: false
+var1: example
var3: example
var4: example
```
diff --git a/tests/results/test_namespace/00_6string.adoc b/tests/results/test_namespace/00_6string.adoc
index 9904afc99..6a1c7468a 100644
--- a/tests/results/test_namespace/00_6string.adoc
+++ b/tests/results/test_namespace/00_6string.adoc
@@ -36,5 +36,17 @@ The fifth variable. +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
The sixth variable. +
**Default**: value
+|
+
+**rougail.var7** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
+The seventh variable. +
+**Default**: 8080
+|
+
+**rougail.var8** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
+The height variable. +
+**Default**: true
|====
diff --git a/tests/results/test_namespace/00_6string.json b/tests/results/test_namespace/00_6string.json
index 4654d23ab..583d25ff4 100644
--- a/tests/results/test_namespace/00_6string.json
+++ b/tests/results/test_namespace/00_6string.json
@@ -184,6 +184,66 @@
"descriptions": [
"The sixth variable."
]
+ },
+ "rougail.var7": {
+ "type": "variable",
+ "default": {
+ "name": "Default",
+ "values": "8080"
+ },
+ "properties": [
+ {
+ "type": "type",
+ "name": "string"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "mandatory"
+ }
+ ],
+ "paths": [
+ "rougail.var7"
+ ],
+ "names": [
+ "var7"
+ ],
+ "descriptions": [
+ "The seventh variable."
+ ]
+ },
+ "rougail.var8": {
+ "type": "variable",
+ "default": {
+ "name": "Default",
+ "values": "true"
+ },
+ "properties": [
+ {
+ "type": "type",
+ "name": "string"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "mandatory"
+ }
+ ],
+ "paths": [
+ "rougail.var8"
+ ],
+ "names": [
+ "var8"
+ ],
+ "descriptions": [
+ "The height variable."
+ ]
}
}
}
diff --git a/tests/results/test_namespace/00_6string.md b/tests/results/test_namespace/00_6string.md
index f7ab70fa1..c38597ff1 100644
--- a/tests/results/test_namespace/00_6string.md
+++ b/tests/results/test_namespace/00_6string.md
@@ -8,4 +8,6 @@
| **rougail.var4**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The forth variable.
**Default**: value |
| **rougail.var5**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The fifth variable.
**Default**: value |
| **rougail.var6**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The sixth variable.
**Default**: value |
+| **rougail.var7**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The seventh variable.
**Default**: 8080 |
+| **rougail.var8**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The height variable.
**Default**: true |
diff --git a/tests/results/test_namespace/00_6string.sh b/tests/results/test_namespace/00_6string.sh
index c52da048c..3e6f598a0 100644
--- a/tests/results/test_namespace/00_6string.sh
+++ b/tests/results/test_namespace/00_6string.sh
@@ -23,4 +23,10 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mrougail.var6[0m │ The sixth variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: value │
+├───────────────────────────────────────┼──────────────────────────────────────┤
+│ [1mrougail.var7[0m │ The seventh variable. │
+│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: 8080 │
+├───────────────────────────────────────┼──────────────────────────────────────┤
+│ [1mrougail.var8[0m │ The height variable. │
+│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: true │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional.adoc b/tests/results/test_namespace/00_9default_calculation_multi_optional.adoc
index 754801742..48777bb6c 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional.adoc
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional.adoc
@@ -14,6 +14,6 @@ My_variable. +
**rougail.my_calculated_variable** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
My_calculated_variable. +
-**Default**: the value of the variable "rougail.my_variable".
+**Default**: the value of the variable "rougail.my_variable" if it is defined.
|====
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional.json b/tests/results/test_namespace/00_9default_calculation_multi_optional.json
index 5dd3bf1f0..13ed076cd 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional.json
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional.json
@@ -49,7 +49,7 @@
"default": {
"name": "Default",
"values": [
- "the value of the variable \"rougail.my_variable\"."
+ "the value of the variable \"rougail.my_variable\" if it is defined."
]
},
"properties": [
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional.md b/tests/results/test_namespace/00_9default_calculation_multi_optional.md
index c00f1646a..499dfd711 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional.md
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional.md
@@ -3,5 +3,5 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **rougail.my_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | My_variable.
**Default**: val1 |
-| **rougail.my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "rougail.my_variable". |
+| **rougail.my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "rougail.my_variable" if it is defined. |
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional.sh b/tests/results/test_namespace/00_9default_calculation_multi_optional.sh
index 91b301d2b..e557c6b10 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional.sh
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional.sh
@@ -11,5 +11,6 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mrougail.my_calculated_variable[0m │ My_calculated_variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: the value of the variable │
-│ [1;7munique [0m [1;7m multiple [0m │ "rougail.my_variable". │
+│ [1;7munique [0m [1;7m multiple [0m │ "rougail.my_variable" if it is │
+│ │ defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional2.adoc b/tests/results/test_namespace/00_9default_calculation_multi_optional2.adoc
index 754801742..48777bb6c 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional2.adoc
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional2.adoc
@@ -14,6 +14,6 @@ My_variable. +
**rougail.my_calculated_variable** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
My_calculated_variable. +
-**Default**: the value of the variable "rougail.my_variable".
+**Default**: the value of the variable "rougail.my_variable" if it is defined.
|====
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional2.json b/tests/results/test_namespace/00_9default_calculation_multi_optional2.json
index 5dd3bf1f0..13ed076cd 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional2.json
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional2.json
@@ -49,7 +49,7 @@
"default": {
"name": "Default",
"values": [
- "the value of the variable \"rougail.my_variable\"."
+ "the value of the variable \"rougail.my_variable\" if it is defined."
]
},
"properties": [
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional2.md b/tests/results/test_namespace/00_9default_calculation_multi_optional2.md
index c00f1646a..499dfd711 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional2.md
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional2.md
@@ -3,5 +3,5 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **rougail.my_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | My_variable.
**Default**: val1 |
-| **rougail.my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "rougail.my_variable". |
+| **rougail.my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "rougail.my_variable" if it is defined. |
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional2.sh b/tests/results/test_namespace/00_9default_calculation_multi_optional2.sh
index 91b301d2b..e557c6b10 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional2.sh
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional2.sh
@@ -11,5 +11,6 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mrougail.my_calculated_variable[0m │ My_calculated_variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: the value of the variable │
-│ [1;7munique [0m [1;7m multiple [0m │ "rougail.my_variable". │
+│ [1;7munique [0m [1;7m multiple [0m │ "rougail.my_variable" if it is │
+│ │ defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional_default.adoc b/tests/results/test_namespace/00_9default_calculation_multi_optional_default.adoc
index 754801742..48777bb6c 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional_default.adoc
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional_default.adoc
@@ -14,6 +14,6 @@ My_variable. +
**rougail.my_calculated_variable** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
My_calculated_variable. +
-**Default**: the value of the variable "rougail.my_variable".
+**Default**: the value of the variable "rougail.my_variable" if it is defined.
|====
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional_default.json b/tests/results/test_namespace/00_9default_calculation_multi_optional_default.json
index 5dd3bf1f0..13ed076cd 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional_default.json
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional_default.json
@@ -49,7 +49,7 @@
"default": {
"name": "Default",
"values": [
- "the value of the variable \"rougail.my_variable\"."
+ "the value of the variable \"rougail.my_variable\" if it is defined."
]
},
"properties": [
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional_default.md b/tests/results/test_namespace/00_9default_calculation_multi_optional_default.md
index c00f1646a..499dfd711 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional_default.md
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional_default.md
@@ -3,5 +3,5 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **rougail.my_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | My_variable.
**Default**: val1 |
-| **rougail.my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "rougail.my_variable". |
+| **rougail.my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "rougail.my_variable" if it is defined. |
diff --git a/tests/results/test_namespace/00_9default_calculation_multi_optional_default.sh b/tests/results/test_namespace/00_9default_calculation_multi_optional_default.sh
index 91b301d2b..e557c6b10 100644
--- a/tests/results/test_namespace/00_9default_calculation_multi_optional_default.sh
+++ b/tests/results/test_namespace/00_9default_calculation_multi_optional_default.sh
@@ -11,5 +11,6 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mrougail.my_calculated_variable[0m │ My_calculated_variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: the value of the variable │
-│ [1;7munique [0m [1;7m multiple [0m │ "rougail.my_variable". │
+│ [1;7munique [0m [1;7m multiple [0m │ "rougail.my_variable" if it is │
+│ │ defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/00_9default_calculation_optional_exists.adoc b/tests/results/test_namespace/00_9default_calculation_optional_exists.adoc
index 90e626297..fa9141471 100644
--- a/tests/results/test_namespace/00_9default_calculation_optional_exists.adoc
+++ b/tests/results/test_namespace/00_9default_calculation_optional_exists.adoc
@@ -17,6 +17,6 @@ My_variable. +
**rougail.my_calculated_variable** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` |
My_calculated_variable. +
-**Default**: the value of the variable "rougail.my_variable".
+**Default**: the value of the variable "rougail.my_variable" if it is defined.
|====
diff --git a/tests/results/test_namespace/00_9default_calculation_optional_exists.json b/tests/results/test_namespace/00_9default_calculation_optional_exists.json
index e93798c79..5e690fb3e 100644
--- a/tests/results/test_namespace/00_9default_calculation_optional_exists.json
+++ b/tests/results/test_namespace/00_9default_calculation_optional_exists.json
@@ -59,7 +59,7 @@
"type": "variable",
"default": {
"name": "Default",
- "values": "the value of the variable \"rougail.my_variable\"."
+ "values": "the value of the variable \"rougail.my_variable\" if it is defined."
},
"properties": [
{
diff --git a/tests/results/test_namespace/00_9default_calculation_optional_exists.md b/tests/results/test_namespace/00_9default_calculation_optional_exists.md
index 4f7597a26..0e36f732a 100644
--- a/tests/results/test_namespace/00_9default_calculation_optional_exists.md
+++ b/tests/results/test_namespace/00_9default_calculation_optional_exists.md
@@ -3,5 +3,5 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **rougail.my_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_variable.
**Default**:
- val1
- val2 |
-| **rougail.my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "rougail.my_variable". |
+| **rougail.my_calculated_variable**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | My_calculated_variable.
**Default**: the value of the variable "rougail.my_variable" if it is defined. |
diff --git a/tests/results/test_namespace/00_9default_calculation_optional_exists.sh b/tests/results/test_namespace/00_9default_calculation_optional_exists.sh
index bb9f0c160..a3d4140a9 100644
--- a/tests/results/test_namespace/00_9default_calculation_optional_exists.sh
+++ b/tests/results/test_namespace/00_9default_calculation_optional_exists.sh
@@ -13,5 +13,6 @@
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mrougail.my_calculated_variable[0m │ My_calculated_variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: the value of the variable │
-│ [1;7munique [0m [1;7m multiple [0m │ "rougail.my_variable". │
+│ [1;7munique [0m [1;7m multiple [0m │ "rougail.my_variable" if it is │
+│ │ defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/04_5disabled_calculation_optional_default.adoc b/tests/results/test_namespace/04_5disabled_calculation_optional_default.adoc
index cfecbefae..3bb98084b 100644
--- a/tests/results/test_namespace/04_5disabled_calculation_optional_default.adoc
+++ b/tests/results/test_namespace/04_5disabled_calculation_optional_default.adoc
@@ -11,15 +11,21 @@ A condition. +
**Default**: false
|
+**rougail.var1** +
+`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `__hidden__` |
+A first variable. +
+**Hidden**: when the variable "rougail.unknown" is defined and has the value "true".
+|
+
**rougail.var3** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `__hidden__` |
A second variable. +
-**Hidden**: when the variable "rougail.condition" has the value "true".
+**Hidden**: when the variable "rougail.condition" is defined and has the value "true".
|
**rougail.var4** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `__hidden__` |
A forth variable. +
-**Hidden**: when the variable "rougail.condition" has the value "true".
+**Hidden**: when the variable "rougail.condition" is defined and has the value "true".
|====
diff --git a/tests/results/test_namespace/04_5disabled_calculation_optional_default.json b/tests/results/test_namespace/04_5disabled_calculation_optional_default.json
index 339acd0f8..9298c2114 100644
--- a/tests/results/test_namespace/04_5disabled_calculation_optional_default.json
+++ b/tests/results/test_namespace/04_5disabled_calculation_optional_default.json
@@ -47,6 +47,33 @@
"A condition."
]
},
+ "rougail.var1": {
+ "type": "variable",
+ "properties": [
+ {
+ "type": "type",
+ "name": "string"
+ },
+ {
+ "type": "mode",
+ "name": "standard"
+ },
+ {
+ "type": "property",
+ "name": "hidden",
+ "annotation": "when the variable \"rougail.unknown\" is defined and has the value \"true\"."
+ }
+ ],
+ "paths": [
+ "rougail.var1"
+ ],
+ "names": [
+ "var1"
+ ],
+ "descriptions": [
+ "A first variable."
+ ]
+ },
"rougail.var3": {
"type": "variable",
"properties": [
@@ -61,7 +88,7 @@
{
"type": "property",
"name": "hidden",
- "annotation": "when the variable \"rougail.condition\" has the value \"true\"."
+ "annotation": "when the variable \"rougail.condition\" is defined and has the value \"true\"."
}
],
"paths": [
@@ -88,7 +115,7 @@
{
"type": "property",
"name": "hidden",
- "annotation": "when the variable \"rougail.condition\" has the value \"true\"."
+ "annotation": "when the variable \"rougail.condition\" is defined and has the value \"true\"."
}
],
"paths": [
diff --git a/tests/results/test_namespace/04_5disabled_calculation_optional_default.md b/tests/results/test_namespace/04_5disabled_calculation_optional_default.md
index a36af9419..8d796eba8 100644
--- a/tests/results/test_namespace/04_5disabled_calculation_optional_default.md
+++ b/tests/results/test_namespace/04_5disabled_calculation_optional_default.md
@@ -3,6 +3,7 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **rougail.condition**
[`boolean`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A condition.
**Default**: false |
-| **rougail.var3**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A second variable.
**Hidden**: when the variable "rougail.condition" has the value "true". |
-| **rougail.var4**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A forth variable.
**Hidden**: when the variable "rougail.condition" has the value "true". |
+| **rougail.var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A first variable.
**Hidden**: when the variable "rougail.unknown" is defined and has the value "true". |
+| **rougail.var3**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A second variable.
**Hidden**: when the variable "rougail.condition" is defined and has the value "true". |
+| **rougail.var4**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` *`hidden`* | A forth variable.
**Hidden**: when the variable "rougail.condition" is defined and has the value "true". |
diff --git a/tests/results/test_namespace/04_5disabled_calculation_optional_default.sh b/tests/results/test_namespace/04_5disabled_calculation_optional_default.sh
index 864ee853a..bcfebb3f3 100644
--- a/tests/results/test_namespace/04_5disabled_calculation_optional_default.sh
+++ b/tests/results/test_namespace/04_5disabled_calculation_optional_default.sh
@@ -9,13 +9,18 @@
│ [1mrougail.condition[0m │ A condition. │
│ [1;7m boolean [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: false │
├───────────────────────────────────────┼──────────────────────────────────────┤
+│ [1mrougail.var1[0m │ A first variable. │
+│ [1;7m string [0m [1;7m standard [0m [1;3;7m hidden [0m │ [1mHidden[0m: when the variable │
+│ │ "rougail.unknown" is defined and has │
+│ │ the value "true". │
+├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mrougail.var3[0m │ A second variable. │
│ [1;7m string [0m [1;7m standard [0m [1;3;7m hidden [0m │ [1mHidden[0m: when the variable │
-│ │ "rougail.condition" has the value │
-│ │ "true". │
+│ │ "rougail.condition" is defined and │
+│ │ has the value "true". │
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mrougail.var4[0m │ A forth variable. │
│ [1;7m string [0m [1;7m standard [0m [1;3;7m hidden [0m │ [1mHidden[0m: when the variable │
-│ │ "rougail.condition" has the value │
-│ │ "true". │
+│ │ "rougail.condition" is defined and │
+│ │ has the value "true". │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.adoc b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.adoc
index 3d7c7626e..28540b75e 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.adoc
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.adoc
@@ -41,6 +41,6 @@ A dynamic variable.
**rougail.var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
A variable calculated. +
-**Default**: the value of the variable "rougail.dynval1.var".
+**Default**: the value of the variable "rougail.dynval1.var" if it is defined.
|====
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.json b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.json
index 7e0e4334d..d52f633b7 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.json
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.json
@@ -111,7 +111,7 @@
"type": "variable",
"default": {
"name": "Default",
- "values": "the value of the variable \"rougail.dynval1.var\"."
+ "values": "the value of the variable \"rougail.dynval1.var\" if it is defined."
},
"properties": [
{
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.md b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.md
index ea61a90ff..5473ed4f8 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.md
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.md
@@ -18,5 +18,5 @@ This family builds families dynamically.
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "rougail.dynval1.var". |
+| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "rougail.dynval1.var" if it is defined. |
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.sh b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.sh
index 7a5b15a87..2ca5b396e 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.sh
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty.sh
@@ -37,5 +37,6 @@ This family builds families dynamically.
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [1mrougail.var2[0m │ A variable calculated. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: the value of the variable │
-│ │ "rougail.dynval1.var". │
+│ │ "rougail.dynval1.var" if it is │
+│ │ defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.adoc b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.adoc
index d66c52653..3f2aca96f 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.adoc
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.adoc
@@ -37,6 +37,6 @@ A dynamic variable.
**rougail.var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
A variable calculated. +
-**Default**: the value of the variable "rougail.dynval1.var".
+**Default**: the value of the variable "rougail.dynval1.var" if it is defined.
|====
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.json b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.json
index 069e9297b..2b2a6060e 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.json
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.json
@@ -104,7 +104,7 @@
"type": "variable",
"default": {
"name": "Default",
- "values": "the value of the variable \"rougail.dynval1.var\"."
+ "values": "the value of the variable \"rougail.dynval1.var\" if it is defined."
},
"properties": [
{
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.md b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.md
index 07d89e6fe..cd0b6b0cd 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.md
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.md
@@ -18,5 +18,5 @@ This family builds families dynamically.
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "rougail.dynval1.var". |
+| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "rougail.dynval1.var" if it is defined. |
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.sh b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.sh
index 03e280390..7b597dea4 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.sh
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_2.sh
@@ -35,5 +35,6 @@ This family builds families dynamically.
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [1mrougail.var2[0m │ A variable calculated. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: the value of the variable │
-│ │ "rougail.dynval1.var". │
+│ │ "rougail.dynval1.var" if it is │
+│ │ defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.adoc b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.adoc
index ce801f8f1..37333d3de 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.adoc
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.adoc
@@ -8,7 +8,7 @@
**rougail.var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
A variable calculated. +
-**Default**: the value of the variable "rougail.dynval1.var".
+**Default**: the value of the variable "rougail.dynval1.var" if it is defined.
|
**rougail.var1** +
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.json b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.json
index d114f59fc..2e9fb9ccd 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.json
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.json
@@ -21,7 +21,7 @@
"type": "variable",
"default": {
"name": "Default",
- "values": "the value of the variable \"rougail.dynval1.var\"."
+ "values": "the value of the variable \"rougail.dynval1.var\" if it is defined."
},
"properties": [
{
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.md b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.md
index 1db054925..7998d17d4 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.md
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.md
@@ -2,7 +2,7 @@
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "rougail.dynval1.var". |
+| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "rougail.dynval1.var" if it is defined. |
| **rougail.var1**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `unique` `multiple` | A suffix variable.
**Examples**:
- val1
- val2 |
## rougail.dyn*val1* or rougail.dyn*val2*
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.sh b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.sh
index 1b2166bdf..a0c3f6a79 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.sh
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_suffix_empty_3.sh
@@ -8,7 +8,8 @@
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [1mrougail.var2[0m │ A variable calculated. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: the value of the variable │
-│ │ "rougail.dynval1.var". │
+│ │ "rougail.dynval1.var" if it is │
+│ │ defined. │
├───────────────────────────────────────┼──────────────────────────────────────┤
│ [1mrougail.var1[0m │ A suffix variable. │
│ [1;7m string [0m [1;7m standard [0m [1;7m unique [0m [1;7m [0m │ [1mExamples[0m: │
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.adoc b/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.adoc
index 3d7c7626e..28540b75e 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.adoc
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.adoc
@@ -41,6 +41,6 @@ A dynamic variable.
**rougail.var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` |
A variable calculated. +
-**Default**: the value of the variable "rougail.dynval1.var".
+**Default**: the value of the variable "rougail.dynval1.var" if it is defined.
|====
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.json b/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.json
index 7e0e4334d..d52f633b7 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.json
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.json
@@ -111,7 +111,7 @@
"type": "variable",
"default": {
"name": "Default",
- "values": "the value of the variable \"rougail.dynval1.var\"."
+ "values": "the value of the variable \"rougail.dynval1.var\" if it is defined."
},
"properties": [
{
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.md b/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.md
index ea61a90ff..5473ed4f8 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.md
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.md
@@ -18,5 +18,5 @@ This family builds families dynamically.
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "rougail.dynval1.var". |
+| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A variable calculated.
**Default**: the value of the variable "rougail.dynval1.var" if it is defined. |
diff --git a/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.sh b/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.sh
index 7a5b15a87..2ca5b396e 100644
--- a/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.sh
+++ b/tests/results/test_namespace/60_5family_dynamic_calc_variable_empty.sh
@@ -37,5 +37,6 @@ This family builds families dynamically.
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [1mrougail.var2[0m │ A variable calculated. │
│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mDefault[0m: the value of the variable │
-│ │ "rougail.dynval1.var". │
+│ │ "rougail.dynval1.var" if it is │
+│ │ defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.adoc b/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.adoc
index dd943f369..2c866ae56 100644
--- a/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.adoc
+++ b/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.adoc
@@ -54,7 +54,9 @@ A variable inside a sub dynamic family. +
A variable. +
**Default**:
-* the value of the variable "rougail.my_dyn_family_val1.subdyn___val1__.var"
-* the value of the variable "rougail.my_dyn_family_val1.subdyn___val2__.var"
+* the value of the variable "rougail.my_dyn_family_val1.subdyn___val1__.var" if it
+is defined
+* the value of the variable "rougail.my_dyn_family_val1.subdyn___val2__.var" if it
+is defined
|====
diff --git a/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.json b/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.json
index 38d58c804..6d806d1ab 100644
--- a/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.json
+++ b/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.json
@@ -151,8 +151,8 @@
"default": {
"name": "Default",
"values": [
- "the value of the variable \"rougail.my_dyn_family_val1.subdyn_val1.var\"",
- "the value of the variable \"rougail.my_dyn_family_val1.subdyn_val2.var\""
+ "the value of the variable \"rougail.my_dyn_family_val1.subdyn_val1.var\" if it is defined",
+ "the value of the variable \"rougail.my_dyn_family_val1.subdyn_val2.var\" if it is defined"
]
},
"properties": [
diff --git a/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.md b/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.md
index 0b809bc0d..a9a2be107 100644
--- a/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.md
+++ b/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.md
@@ -26,5 +26,5 @@ This family builds families dynamically.
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `unique` `multiple` | A variable.
**Default**:
- the value of the variable "rougail.my_dyn_family_val1.subdyn_*val1*.var"
- the value of the variable "rougail.my_dyn_family_val1.subdyn_*val2*.var" |
+| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `unique` `multiple` | A variable.
**Default**:
- the value of the variable "rougail.my_dyn_family_val1.subdyn_*val1*.var" if it is defined
- the value of the variable "rougail.my_dyn_family_val1.subdyn_*val2*.var" if it is defined |
diff --git a/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.sh b/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.sh
index d71e84b03..6c70dd321 100644
--- a/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.sh
+++ b/tests/results/test_namespace/60_5family_dynamic_variable_outside_sub_suffix_empty.sh
@@ -55,6 +55,8 @@ This family builds families dynamically.
│ [1;7m string [0m [1;7m standard [0m [1;7m unique [0m [1;7m [0m │ [1mDefault[0m: │
│ [1;7mmultiple [0m │ - the value of the variable │
│ │ "rougail.my_dyn_family_val1.subdyn_[3m…[0m │
+│ │ if it is defined │
│ │ - the value of the variable │
│ │ "rougail.my_dyn_family_val1.subdyn_[3m…[0m │
+│ │ if it is defined │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.adoc b/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.adoc
index 7b32a814f..4a6fe09d1 100644
--- a/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.adoc
+++ b/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.adoc
@@ -42,6 +42,6 @@ A variable inside dynamic family. +
**rougail.var2** +
`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` |
A variable. +
-**Default**: the value of the variable "rougail.dyn_val1.var".
+**Default**: the value of the variable "rougail.dyn_val1.var" if it is defined.
|====
diff --git a/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.json b/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.json
index 838174a85..c9710a39a 100644
--- a/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.json
+++ b/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.json
@@ -116,7 +116,7 @@
"type": "variable",
"default": {
"name": "Default",
- "values": "the value of the variable \"rougail.dyn_val1.var\"."
+ "values": "the value of the variable \"rougail.dyn_val1.var\" if it is defined."
},
"properties": [
{
diff --git a/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.md b/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.md
index 150205c42..ad9f7251c 100644
--- a/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.md
+++ b/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.md
@@ -18,5 +18,5 @@ This family builds families dynamically.
| Variable | Description |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` | A variable.
**Default**: the value of the variable "rougail.dyn_val1.var". |
+| **rougail.var2**
[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` | A variable.
**Default**: the value of the variable "rougail.dyn_val1.var" if it is defined. |
diff --git a/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.sh b/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.sh
index 9b8a83587..6537a33d1 100644
--- a/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.sh
+++ b/tests/results/test_namespace/60_5family_dynamic_variable_outside_suffix_empty.sh
@@ -37,5 +37,6 @@ This family builds families dynamically.
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ [1mrougail.var2[0m │ A variable. │
│ [1;7m string [0m [1;7m standard [0m │ [1mDefault[0m: the value of the variable │
-│ │ "rougail.dyn_val1.var". │
+│ │ "rougail.dyn_val1.var" if it is │
+│ │ defined. │
└───────────────────────────────────────┴──────────────────────────────────────┘
diff --git a/tests/results/test_namespace_examples/00_6string.md b/tests/results/test_namespace_examples/00_6string.md
index 919b25344..f7855dc9d 100644
--- a/tests/results/test_namespace_examples/00_6string.md
+++ b/tests/results/test_namespace_examples/00_6string.md
@@ -18,4 +18,6 @@ rougail:
var4: value
var5: value
var6: value
+ var7: '8080'
+ var8: 'true'
```
diff --git a/tests/results/test_namespace_examples/04_5disabled_calculation_optional_default.md b/tests/results/test_namespace_examples/04_5disabled_calculation_optional_default.md
index cf754c0a7..eb896a5e7 100644
--- a/tests/results/test_namespace_examples/04_5disabled_calculation_optional_default.md
+++ b/tests/results/test_namespace_examples/04_5disabled_calculation_optional_default.md
@@ -4,6 +4,7 @@
---
rougail:
condition: false
+ var1: example
var3: example
var4: example
```