Reinstate event type info
The 'typeof' info on the events was perpetrated by a fearsome hack which I broke. I don't want to fix it any better right now, so just make the hack work and pull the rug over.
This commit is contained in:
parent
d17c84b819
commit
9a5673a1cc
1 changed files with 6 additions and 3 deletions
|
@ -653,12 +653,15 @@ class MatrixUnits(Units):
|
||||||
ROOM_EVENT: "Message Event",
|
ROOM_EVENT: "Message Event",
|
||||||
STATE_EVENT: "State 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)
|
json_schema = resolve_references(filepath, json_schema)
|
||||||
|
|
||||||
if json_schema.get("title"):
|
|
||||||
schema["typeof"] = json_schema["title"]
|
|
||||||
|
|
||||||
# add type
|
# add type
|
||||||
schema["type"] = Units.prop(
|
schema["type"] = Units.prop(
|
||||||
json_schema, "properties/type/enum"
|
json_schema, "properties/type/enum"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue