diff --git a/event-schemas/schema/v1/m.call.answer b/event-schemas/schema/v1/m.call.answer index d14d4c7d..78b68ce1 100644 --- a/event-schemas/schema/v1/m.call.answer +++ b/event-schemas/schema/v1/m.call.answer @@ -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": { "type": "string", diff --git a/event-schemas/schema/v1/m.call.invite b/event-schemas/schema/v1/m.call.invite index b951d30b..2be01466 100644 --- a/event-schemas/schema/v1/m.call.invite +++ b/event-schemas/schema/v1/m.call.invite @@ -21,7 +21,7 @@ "type": { "type": "string", "enum": ["offer"], - "description": "The type of session description. Must be 'offer'." + "description": "The type of session description." }, "sdp": { "type": "string", diff --git a/templating/matrix_templates/units.py b/templating/matrix_templates/units.py index ea62725b..28fc3f9b 100644 --- a/templating/matrix_templates/units.py +++ b/templating/matrix_templates/units.py @@ -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: + value_type = "enum" + desc += ( + " One of: %s" % json.dumps(props[key_name]["enum"]) + ) + else: + desc += ( + " Must be '%s'." % props[key_name]["enum"][0] + ) fields["rows"].append({ "key": key_name,