Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFR-2419: Deprecate singular noun endpoints #493

Merged
merged 4 commits into from
Jan 2, 2025

Conversation

jackiequach
Copy link
Contributor

Description

  • Adds deprecated custom decorator to add Warning header to responses
  • Adds deprecation warning to singular noun endpoints

Testing

  • docker compose up, hit the /edition, /link, /collection, /work endpoints and verify the warning header is present

Note: we could also update the status code (i.e. 299) for the response to flag it to users of the API

@kylevillegas93 kylevillegas93 self-requested a review January 2, 2025 14:12
Copy link
Contributor

@kylevillegas93 kylevillegas93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good! Will the deprecated annotation also add the warning for the new routes or just the old?

@jackiequach
Copy link
Contributor Author

jackiequach commented Jan 2, 2025

These changes look good! Will the deprecated annotation also add the warning for the new routes or just the old?

Based on my testing, it should only be added to the old routes.

@jackiequach jackiequach merged commit 2973981 into main Jan 2, 2025
1 check passed
jackiequach added a commit that referenced this pull request Jan 2, 2025
* add deprecation warning header for singular noun endpoints

* fix linting error

* add check for response type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants