BUG: Incorrect Header Assignment in Deprecated Endpoint Decorator
Bug: Wrong date in deprecated endpoint header
Hey maintainers.... I was going through the codebase and noticed a small bug in the deprecated endpoint decorator that could confuse API users.
What's happening:
In api_app/decorators.py around line 36, there's a copy-paste error where the X-End-Of-Life-Date header is getting the wrong value. It's currently set to deprecation_date when it should be set to end_of_life_date.
Here's the problematic line: response.headers["X-End-Of-Life-Date"] = deprecation_date
It should be: response.headers["X-End-Of-Life-Date"] = end_of_life_date
Why this matters:
When you deprecate an endpoint with something like @deprecated_endpoint(deprecation_date="2025-01-01", end_of_life_date="2025-12-31"), API consumers checking the response headers will see January 1st in the X-End-Of-Life-Date field instead of December 31st. This makes it really hard for them to plan their migrations properly.
@mlodic @fgibertoni can you please take a look and assign this issue to me
@mlodic @fgibertoni i would like to work on this, can you please assign this to me?
@mlodic @fgibertoni I worked on it in #3111.