diff --git a/docs/validation-rules.rst b/docs/validation-rules.rst index beeba48..87aa5e2 100644 --- a/docs/validation-rules.rst +++ b/docs/validation-rules.rst @@ -418,64 +418,6 @@ Example -Name ----- - -Name of the schema. - -This have no effect on the parsing, but is useful for humans to read. - -Example - -.. code-block:: yaml - - # Schema - name: foobar schema - - - -Desc ----- - -Description of schema. - -This have no effect on the parsing, but is useful for humans to read. Similar to ``name``. - -Value for desc ``MUST`` be a string otherwise a ``RuleError`` will be raised upon usage. - -Example - -.. code-block:: yaml - - # Schema - desc: This schema is very foobar - - - -Example -------- - -Write a example that can show what values is upported. Or just type any comment into the schema for future reference. - -It is possible to use in all levels and places in the schema and have no effect on the parsing, -but is useful for humans to read. Similar to ``desc``. - -Value for ``example`` ``MUST`` be a string otherwise a ``RuleError`` will be raised upon usage. - -Example - -.. code-block:: yaml - - # Schema - example: List of values - type: seq - sequence: - - type: str - unique: true - example: Each value must be unique and a string - - - Unique ------ @@ -614,3 +556,62 @@ If the constraint was instead ``matching-rule: all``, the same data would be val foobar1: 1 foobar2: 2 bar2: 3 + + + +Name +---- + +Name of the schema. + +This have no effect on the parsing, but is useful for humans to read. + +Example + +.. code-block:: yaml + + # Schema + name: foobar schema + + + +Desc +---- + +Description of schema. + +This have no effect on the parsing, but is useful for humans to read. Similar to ``name``. + +Value for desc ``MUST`` be a string otherwise a ``RuleError`` will be raised upon usage. + +Example + +.. code-block:: yaml + + # Schema + desc: This schema is very foobar + + + +Example +------- + +Write a example that can show what values is upported. Or just type any comment into the schema for future reference. + +It is possible to use in all levels and places in the schema and have no effect on the parsing, +but is useful for humans to read. Similar to ``desc``. + +Value for ``example`` ``MUST`` be a string otherwise a ``RuleError`` will be raised upon usage. + +Example + +.. code-block:: yaml + + # Schema + example: List of values + type: seq + sequence: + - type: str + unique: true + example: Each value must be unique and a string +