1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/ansible_testing/schema.py

28 lines
813 B
Python
Raw Normal View History

2016-03-01 21:20:57 +01:00
from voluptuous import ALLOW_EXTRA, Any, Required, Schema
option_schema = Schema(
{
Required('description'): Any(basestring, [basestring]),
'required': bool,
2016-03-01 23:18:56 +01:00
'choices': list,
2016-03-01 21:20:57 +01:00
'aliases': list,
'version_added': Any(basestring, float)
},
extra=ALLOW_EXTRA
)
doc_schema = Schema(
{
Required('module'): basestring,
'short_description': Any(basestring, [basestring]),
'description': Any(basestring, [basestring]),
'version_added': Any(basestring, float),
'author': Any(None, basestring, [basestring]),
'notes': Any(None, [basestring]),
'requirements': [basestring],
'options': Any(None, dict),
'extends_documentation_fragment': Any(basestring, [basestring])
},
extra=ALLOW_EXTRA
)