@ -20,7 +20,7 @@
"type": {
"type": "string",
"enum": ["answer"],
"description": "The type of session description. Must be 'answer'."
"description": "The type of session description."
},
"sdp": {
@ -21,7 +21,7 @@
"enum": ["offer"],
"description": "The type of session description. Must be 'offer'."
@ -102,8 +102,15 @@ class MatrixUnits(Units):
else:
value_type = props[key_name]["type"]
if props[key_name].get("enum"):
value_type = "enum"
desc += " One of: %s" % json.dumps(props[key_name]["enum"])
if len(props[key_name].get("enum")) > 1:
desc += (
" One of: %s" % json.dumps(props[key_name]["enum"])
)
" Must be '%s'." % props[key_name]["enum"][0]
fields["rows"].append({
"key": key_name,