diff --git a/templating/matrix_templates/units.py b/templating/matrix_templates/units.py index e3a67b0a..10722f78 100644 --- a/templating/matrix_templates/units.py +++ b/templating/matrix_templates/units.py @@ -653,12 +653,15 @@ class MatrixUnits(Units): ROOM_EVENT: "Message Event", STATE_EVENT: "State Event" } + if type(json_schema.get("allOf")) == list: + schema["typeof"] = base_defs.get( + json_schema["allOf"][0].get("$ref") + ) + elif json_schema.get("title"): + schema["typeof"] = json_schema["title"] json_schema = resolve_references(filepath, json_schema) - if json_schema.get("title"): - schema["typeof"] = json_schema["title"] - # add type schema["type"] = Units.prop( json_schema, "properties/type/enum"