mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
made ansible-doc complain on missing 'requried'
This commit is contained in:
parent
b7c874f81a
commit
3a6ca0b4a6
1 changed files with 3 additions and 1 deletions
|
@ -219,7 +219,9 @@ class DocCLI(CLI):
|
||||||
opt = doc['options'][o]
|
opt = doc['options'][o]
|
||||||
desc = CLI.tty_ify(" ".join(opt['description']))
|
desc = CLI.tty_ify(" ".join(opt['description']))
|
||||||
|
|
||||||
required = opt.get('required', False)
|
required = opt.get('required')
|
||||||
|
if required is None:
|
||||||
|
raise("Missing required field 'Required'")
|
||||||
if not isinstance(required, bool):
|
if not isinstance(required, bool):
|
||||||
raise("Incorrect value for 'Required', a boolean is needed.: %s" % required)
|
raise("Incorrect value for 'Required', a boolean is needed.: %s" % required)
|
||||||
if required:
|
if required:
|
||||||
|
|
Loading…
Reference in a new issue