Skip to content

Commit

Permalink
The key is called 'options', not 'suboptions' as the specifications i…
Browse files Browse the repository at this point in the history
…ndicate.
  • Loading branch information
felixfontein committed Jun 8, 2021
1 parent b2e422d commit 8e92ab3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion antsibull/augment_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ def augment_docs(plugin_info: t.MutableMapping[str, t.MutableMapping[str, t.Any]
add_full_key(plugin_record['doc']['options'], 'suboptions')
if 'entry_points' in plugin_record:
for entry_point in plugin_record['entry_points'].values():
add_full_key(entry_point['options'], 'suboptions')
add_full_key(entry_point['options'], 'options')
8 changes: 4 additions & 4 deletions antsibull/data/docsite/role.rst.j2
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ Parameters
@{ to_kludge_ns('maxdepth', 1) -}@
{% for key, value in ep_doc['options']|dictsort recursive -%}
@{ to_kludge_ns('maxdepth', [loop.depth, from_kludge_ns('maxdepth')] | max) -}@
{% if value['suboptions'] -%}
@{ loop(value['suboptions'].items()) -}@
{% if value['options'] -%}
@{ loop(value['options'].items()) -}@
{% endif -%}
{% endfor -%}
{# Header of the documentation -#}
Expand Down Expand Up @@ -313,8 +313,8 @@ Parameters
{% endif %}
</td>
</tr>
{% if value['suboptions'] %}
@{ loop(value['suboptions']|dictsort) }@
{% if value['options'] %}
@{ loop(value['options']|dictsort) }@
{% endif %}
{% endfor %}
</table>
Expand Down
4 changes: 2 additions & 2 deletions antsibull/schemas/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


class InnerRoleOptionsSchema(OptionsSchema):
suboptions: t.Dict[str, 'InnerRoleOptionsSchema'] = {}
options: t.Dict[str, 'InnerRoleOptionsSchema'] = {}

@p.root_validator(pre=True)
def allow_description_to_be_optional(cls, values):
Expand All @@ -35,7 +35,7 @@ def allow_description_to_be_optional(cls, values):


class RoleOptionsSchema(OptionsSchema):
suboptions: t.Dict[str, 'InnerRoleOptionsSchema'] = {}
options: t.Dict[str, 'InnerRoleOptionsSchema'] = {}


class RoleEntrypointSchema(BaseModel):
Expand Down

0 comments on commit 8e92ab3

Please sign in to comment.