mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
Deduplicate tables with the same title
This commit is contained in:
parent
8322151661
commit
e49ea9015f
|
|
@ -185,7 +185,17 @@ def get_json_schema_object_fields(obj, enforce_title=False, include_parents=Fals
|
|||
"desc": desc,
|
||||
"req_str": "**Required.** " if required else ""
|
||||
})
|
||||
return tables
|
||||
|
||||
titles = set()
|
||||
filtered = []
|
||||
for table in tables:
|
||||
if table.get("title") in titles:
|
||||
continue
|
||||
|
||||
titles.add(table.get("title"))
|
||||
filtered.append(table)
|
||||
|
||||
return filtered
|
||||
|
||||
|
||||
class MatrixUnits(Units):
|
||||
|
|
|
|||
Loading…
Reference in a new issue