summaryrefslogtreecommitdiff
path: root/tools/manpage.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/manpage.py')
-rw-r--r--tools/manpage.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/manpage.py b/tools/manpage.py
index 1ea8753..d8ce09f 100644
--- a/tools/manpage.py
+++ b/tools/manpage.py
@@ -23,7 +23,7 @@ def traverse_schema_part(schema):
schema_part = schema.get(k)
result = None
if isinstance(schema_part, tuple):
- (lowleveldatatype, highleveldatatype) = schema_part
+ (lowleveldatatype, highleveldatatype, extra) = schema_part
if isinstance(highleveldatatype, list):
formatted_datatype = "|".join(["**"+t+"**" for t in highleveldatatype])
else:
@@ -33,6 +33,13 @@ def traverse_schema_part(schema):
else:
result = "**" + k + "**: " + formatted_datatype
+ if extra["optional"]:
+ result += " (optional)"
+
+ default = extra["default"]
+ if default != None:
+ result += " (default: %s)" % (default)
+
tree.add(k, (result, []))
elif isinstance(schema_part, dict):