From cf5e033556ad6ebf6622aa885e368fa53c42cbe2 Mon Sep 17 00:00:00 2001 From: Ganesh B Nalawade Date: Thu, 29 Oct 2020 10:59:19 +0530 Subject: [PATCH 1/2] Add validate plugin docs --- docs/ansible.utils.jsonschema_validate.rst | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 docs/ansible.utils.jsonschema_validate.rst diff --git a/docs/ansible.utils.jsonschema_validate.rst b/docs/ansible.utils.jsonschema_validate.rst new file mode 100644 index 0000000..c3ab581 --- /dev/null +++ b/docs/ansible.utils.jsonschema_validate.rst @@ -0,0 +1,90 @@ +.. _ansible.utils.jsonschema_validate: + + +************************ +ansible.utils.jsonschema +************************ + +**Define configurable options for jsonschema validate plugin** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- This plugin documentation provides the configurable options that can be passed to the validate plugins when *ansible.utils.json* is used as a value for engine option. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + +
ParameterChoices/DefaultsConfigurationComments
+
+ draft + +
+ - +
+
+
    Choices: +
  • draft3
  • +
  • draft4
  • +
  • draft6
  • +
  • draft7 ←
  • +
+
+
env:ANSIBLE_VALIDATE_JSONSCHEMA_DRAFT
+
var: ansible_validate_jsonschema_draft
+
+
This option provides the jsonschema specification that should be used for the validating the data. The criteria option in the validate plugin should follow the specifiaction as mentined by this option
+
+
+ + +Notes +----- + +.. note:: + - The value of ``data`` option should be either of type *dict* or *strings* which should be a valid *dict* when read in python. + - The value of ``criteria`` should be *list* of *dict* or *list* of *strings* and each *string* within the *list* entry should be a valid *dict* when read in python. + + + + + + + +Status +------ + + +Authors +~~~~~~~ + +- Ganesh Nalawade (@ganeshrn) + + +.. hint:: + Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. From 18a6432362b393c3261643734ef57b46384482b9 Mon Sep 17 00:00:00 2001 From: Ganesh B Nalawade Date: Thu, 29 Oct 2020 11:09:11 +0530 Subject: [PATCH 2/2] update validate docs --- docs/ansible.utils.jsonschema_validate.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/ansible.utils.jsonschema_validate.rst b/docs/ansible.utils.jsonschema_validate.rst index c3ab581..d55620f 100644 --- a/docs/ansible.utils.jsonschema_validate.rst +++ b/docs/ansible.utils.jsonschema_validate.rst @@ -5,7 +5,7 @@ ansible.utils.jsonschema ************************ -**Define configurable options for jsonschema validate plugin** +**Define configurable options for jsonschema validate sub-plugin (engine).** Version added: 1.0.0 @@ -17,7 +17,7 @@ Version added: 1.0.0 Synopsis -------- -- This plugin documentation provides the configurable options that can be passed to the validate plugins when *ansible.utils.json* is used as a value for engine option. +- This plugin documentation provides the configurable options when *ansible.utils.jsonschema* is used as a value for ``engine`` option within ``validate`` plugins. Refer individual ``validate`` plugin docs ``engine`` option for more details. @@ -67,6 +67,7 @@ Notes ----- .. note:: + - This sub-plugin is not a standalone pluign and works only when used with ``validate`` plugins. This plugin will be used when ``engine`` option of ``validate`` plugin is set to *ansible.utils.jsonschema*. - The value of ``data`` option should be either of type *dict* or *strings* which should be a valid *dict* when read in python. - The value of ``criteria`` should be *list* of *dict* or *list* of *strings* and each *string* within the *list* entry should be a valid *dict* when read in python.