List deprecated endpoints as deprecated

Affects the title and the table of contents. We can't realistically alter just the table of contents, but the table of contents is generated from this header.

Fixes https://github.com/matrix-org/matrix-doc/issues/1800
pull/977/head
Travis Ralston 5 years ago
parent 356350de91
commit de3802cd5c

@ -1,11 +1,15 @@
{% import 'tables.tmpl' as tables -%}
``{{endpoint.method}} {{endpoint.path}}``
{{(5 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}}
{% if "deprecated" in endpoint and endpoint.deprecated -%}
Deprecated: ``{{endpoint.method}} {{endpoint.path}}``
{{(17 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}}
.. WARNING::
This API is deprecated and will be removed from a future release.
{% else %}
``{{endpoint.method}} {{endpoint.path}}``
{{(5 + (endpoint.path | length) + (endpoint.method | length)) * title_kind}}
{% endif -%}
{{endpoint.desc}}

Loading…
Cancel
Save