Add views/decorators to handle deprecation/removal of API endpoints.

RESOLVED WONTFIX

Status

P4
normal
RESOLVED WONTFIX
5 years ago
3 years ago

People

(Reporter: chuck, Unassigned)

Tracking

Points:
---

Details

(Whiteboard: [marketplace-transition])

(Reporter)

Description

5 years ago
Since new versions of the API inherit the previous version's URL patterns, we need a way to deprecate and remove endpoints that existed in previous versions. I suggest writing a view decorator (to be applied to View.as_view) that handles this for us.

@api_version(deprecated_in=2, removed_in=3)

The decorator would check the API version of the request (available as request.API_VERSION), return a 404 if that's greater than or equal to the removed_in parameter and add a deprecation header to the response if the version is greater than or equal to the value of the deprecated_in parameter.
(Reporter)

Updated

5 years ago
Priority: -- → P4
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
Whiteboard: [marketplace-transition]
You need to log in before you can comment on or make changes to this bug.