mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Add arg and doc validation for PowerShell modules (#53615)
* Add arg and doc validation for PowerShell modules * Verify if pwsh exists before running it
This commit is contained in:
@@ -81,7 +81,7 @@ suboption_schema = Schema(
|
||||
'version_added': Any(float, *string_types),
|
||||
'default': Any(None, float, int, bool, list, dict, *string_types),
|
||||
# Note: Types are strings, not literal bools, such as True or False
|
||||
'type': Any(None, 'bits', 'bool', 'bytes', 'dict', 'float', 'int', 'json', 'jsonarg', 'list', 'path', 'raw', 'str'),
|
||||
'type': Any(None, 'bits', 'bool', 'bytes', 'dict', 'float', 'int', 'json', 'jsonarg', 'list', 'path', 'raw', 'sid', 'str'),
|
||||
# Recursive suboptions
|
||||
'suboptions': Any(None, *list({str_type: Self} for str_type in string_types)),
|
||||
},
|
||||
@@ -102,7 +102,7 @@ option_schema = Schema(
|
||||
'default': Any(None, float, int, bool, list, dict, *string_types),
|
||||
'suboptions': Any(None, *list_dict_suboption_schema),
|
||||
# Note: Types are strings, not literal bools, such as True or False
|
||||
'type': Any(None, 'bits', 'bool', 'bytes', 'dict', 'float', 'int', 'json', 'jsonarg', 'list', 'path', 'raw', 'str'),
|
||||
'type': Any(None, 'bits', 'bool', 'bytes', 'dict', 'float', 'int', 'json', 'jsonarg', 'list', 'path', 'raw', 'sid', 'str'),
|
||||
},
|
||||
extra=PREVENT_EXTRA
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user