1
0
Fork 0

fixed the description generation part of docify

Dieser Commit ist enthalten in:
Sebastian Tobie 2023-04-23 10:25:03 +02:00
Ursprung 931ed6d4f8
Commit 7bec7376db
1 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -25,8 +25,10 @@ def docify(input: Union[dict, AnsibleParameter]) -> dict:
options = dict() options = dict()
for name, help in input.items(): for name, help in input.items():
options[name] = dict(type=help["type"]) options[name] = dict(type=help["type"])
if "description" in help and isinstance(help["description"], str): if "description" in help:
options[name]["description"] = options[name]["description"].split("\n") if isinstance(help["description"], str):
help["description"] = help["description"].split("\n")
options[name]["description"] = help["description"]
if "required" in help and help["required"]: if "required" in help and help["required"]:
options[name]["required"] = True options[name]["required"] = True
else: else: