[tutorial 007] Choice type is optional (config and doc)

This commit is contained in:
egarette@silique.fr 2024-09-07 19:06:32 +02:00
parent cb298bcb68
commit 2742559f6c

View file

@ -11,6 +11,7 @@ include_toc: true
- [[tutorial 004] The variable description](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_004/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_004~1..v1.1_004)) - [[tutorial 004] The variable description](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_004/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_004~1..v1.1_004))
- [[tutorial 005] A default value](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_005/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_005~1..v1.1_005)) - [[tutorial 005] A default value](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_005/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_005~1..v1.1_005))
- [[tutorial 006] A variable with type choice](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_006/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_006~1..v1.1_006)) - [[tutorial 006] A variable with type choice](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_006/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_006~1..v1.1_006))
- [[tutorial 007] Choice type is optional](https://forge.cloud.silique.fr/stove/rougail-tutorials/src/commit/v1.1_007/README.md) ([diff](https://forge.cloud.silique.fr/stove/rougail-tutorials/compare/v1.1_007~1..v1.1_007))
# Description # Description
@ -18,13 +19,9 @@ include_toc: true
<img src="firefox.png" width=50% height=50% alt="Firefox Proxy setting"/> <img src="firefox.png" width=50% height=50% alt="Firefox Proxy setting"/>
A variable with type choice Choice type is optional
"Foo" should not be an option to the "proxy_mode" variable. The type is optional in choice type (if we have choices attributes, it's a choice option).
Now the "proxy_mode" type is "choice", that means that there is a list of available values that can be selected.
We say that the "proxy_mode" variable is constrained (by choices): this variable accept, in fact, only a list of choices.
# Structure # Structure
@ -36,7 +33,6 @@ We say that the "proxy_mode" variable is constrained (by choices): this variable
--- ---
proxy_mode: proxy_mode:
description: Configure Proxy Access to the Internet description: Configure Proxy Access to the Internet
type: choice
choices: choices:
- No proxy - No proxy
- Auto-detect proxy settings for this network - Auto-detect proxy settings for this network