From 52118d8bb7b4f57cbcd4d5e602564e0c4953dc86 Mon Sep 17 00:00:00 2001 From: "Bradley A. Thornton" Date: Wed, 21 Oct 2020 06:08:29 -0700 Subject: [PATCH] Make 'doc' the default schema format (#16) Co-authored-by: cidrblock --- plugins/action/update_fact.py | 1 - plugins/filter/get_path.py | 1 - plugins/filter/index_of.py | 1 - plugins/filter/to_paths.py | 1 - plugins/lookup/get_path.py | 1 - plugins/lookup/index_of.py | 1 - plugins/lookup/to_paths.py | 1 - plugins/module_utils/common/argspec_validate.py | 2 +- 8 files changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/action/update_fact.py b/plugins/action/update_fact.py index 1710909..bbf108e 100644 --- a/plugins/action/update_fact.py +++ b/plugins/action/update_fact.py @@ -42,7 +42,6 @@ class ActionModule(ActionBase): aav = AnsibleArgSpecValidator( data=self._task.args, schema=DOCUMENTATION, - schema_format="doc", name=self._task.action, ) valid, errors, self._task.args = aav.validate() diff --git a/plugins/filter/get_path.py b/plugins/filter/get_path.py index 40bd900..02f46b4 100644 --- a/plugins/filter/get_path.py +++ b/plugins/filter/get_path.py @@ -35,7 +35,6 @@ def _get_path(*args, **kwargs): aav = AnsibleArgSpecValidator( data=data, schema=DOCUMENTATION, - schema_format="doc", name="get_path", ) valid, errors, updated_data = aav.validate() diff --git a/plugins/filter/index_of.py b/plugins/filter/index_of.py index a613052..a94b106 100644 --- a/plugins/filter/index_of.py +++ b/plugins/filter/index_of.py @@ -43,7 +43,6 @@ def _index_of(*args, **kwargs): aav = AnsibleArgSpecValidator( data=data, schema=DOCUMENTATION, - schema_format="doc", name="index_of", ) valid, errors, updated_data = aav.validate() diff --git a/plugins/filter/to_paths.py b/plugins/filter/to_paths.py index b0b2cd5..552db93 100644 --- a/plugins/filter/to_paths.py +++ b/plugins/filter/to_paths.py @@ -32,7 +32,6 @@ def _to_paths(*args, **kwargs): aav = AnsibleArgSpecValidator( data=data, schema=DOCUMENTATION, - schema_format="doc", name="to_paths", ) valid, errors, updated_data = aav.validate() diff --git a/plugins/lookup/get_path.py b/plugins/lookup/get_path.py index 7b26c2d..1749312 100644 --- a/plugins/lookup/get_path.py +++ b/plugins/lookup/get_path.py @@ -171,7 +171,6 @@ class LookupModule(LookupBase): aav = AnsibleArgSpecValidator( data=terms, schema=DOCUMENTATION, - schema_format="doc", name="get_path", ) valid, errors, updated_data = aav.validate() diff --git a/plugins/lookup/index_of.py b/plugins/lookup/index_of.py index 40e2c15..7e5b242 100644 --- a/plugins/lookup/index_of.py +++ b/plugins/lookup/index_of.py @@ -377,7 +377,6 @@ class LookupModule(LookupBase): aav = AnsibleArgSpecValidator( data=terms, schema=DOCUMENTATION, - schema_format="doc", name="index_of", ) valid, errors, updated_data = aav.validate() diff --git a/plugins/lookup/to_paths.py b/plugins/lookup/to_paths.py index 767a8c2..b2ffc09 100644 --- a/plugins/lookup/to_paths.py +++ b/plugins/lookup/to_paths.py @@ -155,7 +155,6 @@ class LookupModule(LookupBase): aav = AnsibleArgSpecValidator( data=terms, schema=DOCUMENTATION, - schema_format="doc", name="to_paths", ) valid, errors, updated_data = aav.validate() diff --git a/plugins/module_utils/common/argspec_validate.py b/plugins/module_utils/common/argspec_validate.py index 2f733f9..cc60f71 100644 --- a/plugins/module_utils/common/argspec_validate.py +++ b/plugins/module_utils/common/argspec_validate.py @@ -139,7 +139,7 @@ class AnsibleArgSpecValidator: self, data, schema, - schema_format, + schema_format="doc", schema_conditionals=None, name=None, other_args=None,