diff --git a/docs/templates/plugin.rst.j2 b/docs/templates/plugin.rst.j2 index 50ee62196e..34c9c2b1bd 100644 --- a/docs/templates/plugin.rst.j2 +++ b/docs/templates/plugin.rst.j2 @@ -61,6 +61,7 @@ Options .. raw:: html
parameter | required | @@ -68,57 +69,94 @@ Optionschoices | comments | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@{ k }@ {% if v['version_added'] %} (added in @{v['version_added']}@){% endif %} |
- {% if v.get('required', False) %}yes{% else %}no{% endif %} | -{% if v['default'] %}@{ v['default'] }@{% endif %} | - {% if v.get('type', 'not_bool') == 'bool' %} +{% for k in option_keys -%} +{% set v = options[k] -%} +{% if not v['suboptions'] %} + +|||||||||||||||||||||||||||||||||||||||||
@{ k }@ {% if v['version_added'] -%} (added in @{v['version_added']}@){% endif -%} |
+ {% if v.get('required', False) -%}yes{% else %}no{% endif -%} | +{% if v['default'] -%}@{ v['default'] }@{% endif -%} | +{% if v.get('type', 'not_bool') == 'bool' %}
|
- {% else %}
- {% if v['choices'] %}
|
- {% endif %}
- {% for desc in v.description -%} @{ desc | replace('\n', '\n ') | html_ify }@ {% endfor -%} {% if 'aliases' in v and v.aliases -%}
- aliases: @{ v.aliases|join(', ') }@ {%- endif %}
- {% else %}
- @{ k }@ |
- {% if v['version_added'] %} (added in @{v['version_added']}@){% endif %} {% if v.get('required', False) %}yes{% else %}no{% endif %} |
-
- | {% for desc in v.description -%} | @{ desc | replace('\n', '\n ') | html_ify }@ {% endfor -%} {% if 'aliases' in v and v.aliases -%}
- aliases: @{ v.aliases|join(', ') }@ {%- endif %}
+{% else %}
+ {% if v['choices'] -%} |
+{% endif %}
+
+{% if v.description is string %}
+ | @{ v.description | replace('\n', '\n ') | html_ify }@
+{% else %}
+{% for desc in v.description %}
+ @{ desc | replace('\n', '\n ') | html_ify }@
+{% endfor %}
+{% endif %}
+{% if 'aliases' in v and v.aliases %}
+ aliases: @{ v.aliases|join(', ') }@
+{% endif %}
+{% else %}
+
+ @{ k }@ |
+ {% if v['version_added'] -%} (added in @{v['version_added']}@){% endif -%} {% if v.get('required', False) -%}yes{% else -%}no{% endif -%} |
+
+ |
+ |
+{% for desc in v.description %}
+ | @{ desc | replace('\n', '\n ') | html_ify }@
+{% endfor %}
+{% if 'aliases' in v and v.aliases %}
+ aliases: @{ v.aliases|join(', ') }@
+{% endif %}
- |
{% if v2['choices'] -%} |
+{% endif %}
+
+{% if v2.description is string %}
+ |
+ @{ v2.description | replace('\n', '\n ') | html_ify }@
+{% else %}
+{% for desc in v2.description %}
+ @{ desc | replace('\n', '\n ') | html_ify }@
+{% endfor %}
+{% endif %}
+{% if 'aliases' in v and v2.aliases %}
+ aliases: @{ v2.aliases|join(', ') }@
+{% endif %}
+ |
+
name | description | @@ -155,19 +194,30 @@ Common return values are documented here :doc:`common_return_values`, the followtype | sample | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@{ entry }@ | -@{ returndocs[entry].description }@ | -@{ returndocs[entry].returned }@ | -@{ returndocs[entry].type }@ | -@{ returndocs[entry].sample}@ | +@{ entry }@ | +
+{% if returndocs[entry].description is string %}
+ @{ returndocs[entry].description | replace('\n', '\n ') | html_ify }@
+{% else %}
+{% for desc in returndocs[entry].description %}
+ @{ desc | replace('\n', '\n ') | html_ify }@
+{% endfor %}
+{% endif %}
+ |
+ @{ returndocs[entry].returned }@ | +@{ returndocs[entry].type }@ | +@{ returndocs[entry].sample | replace('\n', '\n ') | html_ify }@ | |||||||||
contains: | +{% if returndocs[entry].type == 'complex' %} + +||||||||||||||||||
contains: |
|