diff --git a/api/client-server/old_sync.yaml b/api/client-server/old_sync.yaml index 2e2a629e..c51023ae 100644 --- a/api/client-server/old_sync.yaml +++ b/api/client-server/old_sync.yaml @@ -89,6 +89,7 @@ paths: description: "Bad pagination ``from`` parameter." tags: - Room participation + deprecated: true "/initialSync": get: summary: Get the user's current state. @@ -369,6 +370,7 @@ paths: description: There is no avatar URL for this user or this user does not exist. tags: - Room participation + deprecated: true "/events/{eventId}": get: summary: Get a single event by event ID. @@ -406,3 +408,4 @@ paths: description: The event was not found or you do not have permission to read this event. tags: - Room participation + deprecated: true diff --git a/api/client-server/rooms.yaml b/api/client-server/rooms.yaml index c21bd5b6..0af8316d 100644 --- a/api/client-server/rooms.yaml +++ b/api/client-server/rooms.yaml @@ -432,6 +432,7 @@ paths: member of the room. tags: - Room participation + deprecated: true "/rooms/{roomId}/members": get: summary: Get the m.room.member events for the room. diff --git a/templating/matrix_templates/templates/http-api.tmpl b/templating/matrix_templates/templates/http-api.tmpl index 1253e66e..aa52de33 100644 --- a/templating/matrix_templates/templates/http-api.tmpl +++ b/templating/matrix_templates/templates/http-api.tmpl @@ -2,6 +2,11 @@ ``{{endpoint.method}} {{endpoint.path}}`` {{(5 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}} +{% if "deprecated" in endpoint and endpoint.deprecated -%} +.. WARNING:: + This API is deprecated and will be removed from a future release. + +{% endif -%} {% if "alias_for_path" in endpoint -%} ``{{endpoint.path}}`` is an alias for `{{endpoint.alias_for_path}}`_. diff --git a/templating/matrix_templates/units.py b/templating/matrix_templates/units.py index f3f7c9d7..a76c7e16 100644 --- a/templating/matrix_templates/units.py +++ b/templating/matrix_templates/units.py @@ -269,6 +269,7 @@ class MatrixUnits(Units): full_path = api.get("basePath", "").rstrip("/") + path endpoint = { "title": single_api.get("summary", ""), + "deprecated": single_api.get("deprecated", False), "desc": single_api.get("description", single_api.get("summary", "")), "method": method.upper(), "path": full_path.strip(),