From bbd3f8072cccf3d029448f43290c2326cfb6276b Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Mon, 19 Oct 2015 13:28:44 +0100 Subject: [PATCH] Review comments --- event-schemas/schema/v1/m.room.member | 1 + templating/matrix_templates/units.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/event-schemas/schema/v1/m.room.member b/event-schemas/schema/v1/m.room.member index 54ae9100..121f144a 100644 --- a/event-schemas/schema/v1/m.room.member +++ b/event-schemas/schema/v1/m.room.member @@ -67,6 +67,7 @@ "type": "object", "title": "StrippedState", "description": "A stripped down state event, with only the ``type``, ``state_key`` and ``content`` keys.", + "required": ["type", "state_key", "content"], "properties": { "type": { "type": "string", diff --git a/templating/matrix_templates/units.py b/templating/matrix_templates/units.py index 33b5e6b4..9a17dd5b 100644 --- a/templating/matrix_templates/units.py +++ b/templating/matrix_templates/units.py @@ -532,7 +532,8 @@ class MatrixUnits(Units): Units.prop(json_schema, "properties/content") ) - # this is horrible + # This is horrible because we're special casing a key on m.room.member. + # We need to do this because we want to document a non-content object. if schema["type"] == "m.room.member": invite_room_state = get_json_schema_object_fields( json_schema["properties"]["invite_room_state"]["items"]