Description
As we evolve our APIs, we will need to deprecate specific endpoints. We expect this to, at times, happen independently of incrementing major version changes. Today, deprecation is only surfaced through the API documentation, without a way to make the deprecation status visible to callers as part of the actual API responses. Additionally, the deprecation field is currently only communicated through the endpoint descriptions within OpenAPI for the documentation. To ensure that API callers are aware of and can safely respond to REST API deprecation statuses, we need to ensure they are clearly communicated are discoverable through standard, programmatically accessible channels.
Conditions of acceptance
[x For REST APIs, determine how to include a flag in the spec generation process that allows REST API owners to include the "deprecated: true" indicator within the spec itself.
- Propose a way to send a warning or otherwise mark an endpoint as deprecated for callers.
- Recommendation is to follow RFC9745 for the HTTP deprecation header definition. A more human/user friendly description of how to use this header can be found here: https://zuplo.com/learning-center/http-deprecation-header
- Determine if and how this can be used for both Action and REST APIs.
- Review proposal with the MediaWiki Interfaces team and any other stakeholders who are interested.
- Determine if a decision brief is required to socialize more broadly across the foundation. (probably not)
- Announce the plan for how we intend to use the deprecation header to the community, through standard channels. <-- Halley will help with this.
Dependencies
The first known endpoints that we plan to deprecate are the "trailing slash" transform endpoints. Depending on the scope of this work, we may consider this a blocker for actually marking them as deprecated: https://phabricator.wikimedia.org/T404854