diff --git a/docs/docsite/rst/dev_guide/developing_modules_documenting.rst b/docs/docsite/rst/dev_guide/developing_modules_documenting.rst index 539b539d39..c758bf7044 100644 --- a/docs/docsite/rst/dev_guide/developing_modules_documenting.rst +++ b/docs/docsite/rst/dev_guide/developing_modules_documenting.rst @@ -235,6 +235,9 @@ The following fields can be used and are all required unless specified otherwise Data type :sample: One or more examples. + :version_added: + Only needed if this return was extended after initial Ansible release, i.e. this is greater than the top level `version_added` field. + This is a string, and not a float, i.e. ``version_added: "2.3"``. :contains: Optional, if you set `type: complex` you can detail the dictionary here by repeating the above elements. @@ -249,6 +252,9 @@ The following fields can be used and are all required unless specified otherwise Data type :sample: One or more examples. + :version_added: + Only needed if this return was extended after initial Ansible release, i.e. this is greater than the top level `version_added` field. + This is a string, and not a float, i.e. ``version_added: "2.3"``. For complex nested returns type can be specified as ``type: complex``. diff --git a/test/sanity/validate-modules/schema.py b/test/sanity/validate-modules/schema.py index 42ce90c45b..f023d57451 100644 --- a/test/sanity/validate-modules/schema.py +++ b/test/sanity/validate-modules/schema.py @@ -64,6 +64,7 @@ def return_schema(data): Required('description'): Any(list, *string_types), Required('returned'): Any(*string_types), Required('type'): Any('string', 'list', 'boolean', 'dict', 'complex', 'bool', 'float', 'int', 'dictionary', 'str'), + 'version_added': Any(float, *string_types), 'sample': Any(None, list, dict, int, float, *string_types), 'example': Any(None, list, dict, int, float, *string_types) }