diff --git a/templating/internal/sections.py b/templating/internal/sections.py index 27d792e4..8c3e7393 100644 --- a/templating/internal/sections.py +++ b/templating/internal/sections.py @@ -7,7 +7,7 @@ def _render_section_room_events(env, units): examples = units.get("event-examples") schemas = units.get("event-schemas") sections = [] - for event_name in schemas: + for event_name in sorted(schemas): if not event_name.startswith("m.room"): continue sections.append(template.render( diff --git a/templating/internal/units.py b/templating/internal/units.py index 152ab3c0..793c5222 100644 --- a/templating/internal/units.py +++ b/templating/internal/units.py @@ -23,7 +23,7 @@ def _load_common_event_fields(): "desc": event_info["description"], "rows": [] } - for prop in event_info["properties"]: + for prop in sorted(event_info["properties"]): row = { "key": prop, "type": event_info["properties"][prop]["type"], @@ -72,7 +72,7 @@ def _load_schemas(): tables = [fields] props = obj["properties"] - for key_name in props: + for key_name in sorted(props): value_type = None required = key_name in required_keys desc = props[key_name].get("description", "")