Hi,
I’m running into some issues building a docsite with antsibull-doc
.
Given the following module mve_antsibull_doc.py
:
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
module: mve_antsibull_doc
short_description: TBD
description: TBD
attributes:
check_mode:
support: full
diff_mode:
support: full
options:
name:
description: TBD
required: false
type: str
author:
- spike
'''
EXAMPLES = '''
- name: Random example
mve_antsibull_doc:
name: hello
'''
RETURN = '''
name:
description: TBD
type: str
returned: always
'''
from ansible.module_utils.basic import AnsibleModule
def main():
return
if __name__ == '__main__':
main()
I’m running into the following problem:
$ antsibull-docs plugin --plugin-type module --dest-dir /tmp/doc/rst/ my.utils.mve_antsibull_doc
Cannot parse documentation:
10 validation errors for ModuleDocSchema
doc -> attributes -> check_mode -> description
field required (type=value_error.missing)
doc -> attributes -> check_mode -> description
field required (type=value_error.missing)
doc -> attributes -> check_mode -> membership
field required (type=value_error.missing)
doc -> attributes -> check_mode -> description
field required (type=value_error.missing)
doc -> attributes -> check_mode -> platforms
field required (type=value_error.missing)
doc -> attributes -> diff_mode -> description
field required (type=value_error.missing)
doc -> attributes -> diff_mode -> description
field required (type=value_error.missing)
doc -> attributes -> diff_mode -> membership
field required (type=value_error.missing)
doc -> attributes -> diff_mode -> description
field required (type=value_error.missing)
doc -> attributes -> diff_mode -> platforms
field required (type=value_error.missing)
When running (as per documentation)
antsibull-docs sphinx-init --use-current --squash-hierarchy --dest-dir /tmp/doc/ my.utils
cd /tmp/doc/
./build.sh
the html files are generated but only contain the error messages:
Works fine if I add an arbitrary description
key to check_mode
and diff_mode
.
I’ve checked Module format and documentation — Ansible Documentation but that doesn’t list the attributes
field at all. However, most (if not all) of the modules in lib/ansible and community.general do.
I’m running
- antsibull-docs 2.7.0
- antsibull-docs-parser 1.0.0
Is this a bug?