Skip to content

Commit f83e746

Browse files
committed
Fix
1 parent d026a38 commit f83e746

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

doc/reference/reference_lua/config/utils_schema.rst

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,14 @@ Functions
824824
:param table allowed_values: allowed values of array items
825825
:param table annotations: annotations (see :ref:`config_utils_schema_annotation`)
826826

827-
:return: the created schema node
827+
:return: the created array node as a table with the following fields:
828+
829+
- ``type``: ``array``
830+
- ``items``: a table describing an array item as a schema node
831+
- ``validate``: an auto-generated validation function that check
832+
that the values don't repeat
833+
- annotations, if provided
834+
828835
:rtype: table
829836

830837
**See also:** :ref:`config_utils_schema_nodes_array`
@@ -921,8 +928,9 @@ schema_object
921928
:dedent:
922929

923930
:param any data: configuration data
924-
:param string path: path to the target node in the dot notation
925-
:param table path: path to the target node in an array-like table
931+
:param string/table path: path to the target node as:
932+
- a string in the dot notation
933+
- an array-like table
926934

927935

928936
:return: data at the given path
@@ -992,14 +1000,11 @@ schema_object
9921000
- ``box.NULL`` is preferred over ``nil``
9931001
- for scalar and array nodes, the right-hand value is used
9941002

995-
.. important::
996-
997-
Scalars of the ``any`` type are merged the same way as other scalars.
998-
They are not deeply merged even if they are tables.
999-
1000-
.. important::
1003+
.. note::
10011004

1002-
Arrays are not concatenated. Left hand array items are discarded.
1005+
- Scalars of the ``any`` type are merged the same way as other scalars.
1006+
They are not deeply merged even if they are tables.
1007+
- Arrays are not concatenated. Left hand array items are discarded.
10031008

10041009
- records and maps are deeply merged, that is, the merge is performed
10051010
recursively for their nested nodes
@@ -1013,7 +1018,7 @@ schema_object
10131018

10141019
.. method:: pairs()
10151020

1016-
Walk over the schema and return scalar, array and map schema nodes
1021+
Walk over the schema and return scalar, array, and map schema nodes
10171022

10181023
.. important::
10191024

@@ -1045,8 +1050,9 @@ schema_object
10451050
an array-like table (``{ 'http', 'scheme'}``).
10461051

10471052
:param any data: configuration data
1048-
:param string path: path to the target node in the dot notation
1049-
:param table path: path to the target node in an array-like table
1053+
:param string/table path: path to the target node as:
1054+
- a string in the dot notation
1055+
- an array-like table
10501056
:param any value: new value
10511057

10521058
:return: updated configuration data

0 commit comments

Comments
 (0)