From 335e971aeaf599e0d1ba274f45cb82d3f68431fc Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 13 Jun 2026 19:16:24 +0200 Subject: [PATCH] docs(fix): sequence --- docs/tutorial/multiple.rst | 14 ++++++++++---- docs/tutorial/nullable.rst | 2 ++ docs/tutorial/sequence.rst | 22 +++++++++++++++++++--- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/docs/tutorial/multiple.rst b/docs/tutorial/multiple.rst index 957c2230b..e818065b6 100644 --- a/docs/tutorial/multiple.rst +++ b/docs/tutorial/multiple.rst @@ -24,6 +24,8 @@ Variable with multiple values git clone https://forge.cloud.silique.fr/stove/rougail-tutorials.git git switch --detach v1.1_110 +.. _tutorial_not_mandatory_list: + A conditional disabled non mandatory variable with type domainname and parameters ----------------------------------------------------------------------------------- @@ -101,6 +103,14 @@ We then have this output: We can see the address for which proxy will be desactivated in the output. +.. note:: + + We had said that a variable with a mandatory parameter set to false was a :ref:`nullable variable `. + This is true only for a non :term:`multi` variable. + + The value of a :term:`multi` variable which is not :term:`mandatory` will allow the empty list `[]`. + The :term:`mandatory` properties does not means that the `null` value is acceptable (that is the `empty` properties). + A variable with multiple values ----------------------------------- @@ -218,10 +228,6 @@ Now we have this output: A multi is a multiple variable, that is a variable that can have multiple values. -.. note:: Note that the value of a :term:`multi` variable which has no default value set and which is not :term:`mandatory` - will be the empty list `[]` - The :term:`mandatory` properties does not means that the `null` value is acceptable (that is the `empty` properties). - .. keypoints:: Key points We have now some kind of a container facility named `multi`, that can be applied diff --git a/docs/tutorial/nullable.rst b/docs/tutorial/nullable.rst index d7aec434a..17c59f9f3 100644 --- a/docs/tutorial/nullable.rst +++ b/docs/tutorial/nullable.rst @@ -1,3 +1,5 @@ +.. _tutorial_nullable: + Nullable variable ========================== diff --git a/docs/tutorial/sequence.rst b/docs/tutorial/sequence.rst index fee2faf3e..1aecec1e5 100644 --- a/docs/tutorial/sequence.rst +++ b/docs/tutorial/sequence.rst @@ -69,8 +69,24 @@ Here is the structure file associated with this use case: Unsurprisingly, the way to assign the `sequence` type is done with the help of the `type` parameter. We see here that `proxies` is a family because it contains the variables `title` and `color`. -The :term:`sequence` type ensures that in the `proxies` family, if a proxy type is specified, then an associated color will also be specified. -Let's launch the Rougail CLI on this structured data: +There is nothing new to say to this two variable: + +- `title` is not mandatory string +- `color` is just a string + +.. note:: + + The first variable of the :term:`sequence` is not mandatory. + This does not mean that the variable is :ref:`tutorial_nullable` or that the :ref:`list is empty `. + In this case, that means that the sequence is empty. + +Which we could write in JSON like this: + + .. code-block:: json + + [] + +Now configure the sequence: .. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_190/config/02/config.yml :language: yaml @@ -214,7 +230,7 @@ and which contain the same number of elements: Sequence. We saw a :term:`sequence` type family, which full name is :ref:`Sequence of homogeneous elements `. - **comments** + **Comments** What is remarkable here is that we are dealing with a new form of :term:`consistency` which focuses on variables that are similar within a family,