mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Allow documentation of module options type (#42285)
* Allow documentation of module options Pass through the `type` of a modules option so it's displayed on the html module docs * docs
This commit is contained in:
parent
31dd41e4c5
commit
d962611528
2 changed files with 4 additions and 2 deletions
|
@ -239,7 +239,9 @@ The following fields can be used and are all required unless specified otherwise
|
||||||
:choices:
|
:choices:
|
||||||
List of option values. Should be absent if empty.
|
List of option values. Should be absent if empty.
|
||||||
:type:
|
:type:
|
||||||
If an argument is ``type='bool'``, this field should be set to ``type: bool`` and no ``choices`` should be specified.
|
|
||||||
|
* Specifies the data type that option accepts, must match the ``argspec``.
|
||||||
|
* If an argument is ``type='bool'``, this field should be set to ``type: bool`` and no ``choices`` should be specified.
|
||||||
:aliases:
|
:aliases:
|
||||||
List of option name aliases; generally not needed.
|
List of option name aliases; generally not needed.
|
||||||
:version_added:
|
:version_added:
|
||||||
|
|
|
@ -50,7 +50,7 @@ option_schema = Schema(
|
||||||
'default': Any(None, float, int, bool, list, dict, *string_types),
|
'default': Any(None, float, int, bool, list, dict, *string_types),
|
||||||
'suboptions': Any(None, *list_dict_suboption_schema),
|
'suboptions': Any(None, *list_dict_suboption_schema),
|
||||||
# Note: Types are strings, not literal bools, such as True or False
|
# Note: Types are strings, not literal bools, such as True or False
|
||||||
'type': Any(None, "bool")
|
'type': Any(None, 'str', 'list', 'dict', 'bool', 'int', 'float', 'path', 'raw', 'jsonarg', 'json', 'bytes', 'bits')
|
||||||
},
|
},
|
||||||
extra=PREVENT_EXTRA
|
extra=PREVENT_EXTRA
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue