Skip to content

chore(backend): formalize API v1 versioning and deprecation headers (#39)#58

Merged
greatest0fallt1me merged 2 commits intoStreampay-Org:mainfrom
Adedayo-Data:chore/api-versioning-v1
Mar 25, 2026
Merged

chore(backend): formalize API v1 versioning and deprecation headers (#39)#58
greatest0fallt1me merged 2 commits intoStreampay-Org:mainfrom
Adedayo-Data:chore/api-versioning-v1

Conversation

@Adedayo-Data
Copy link
Copy Markdown
Contributor

Description

Refactored the API architecture to use a versioned mounting strategy under /api/v1. This PR also introduces standard headers to support future deprecation and sunset policies without breaking changes.

Key Changes

  • Master V1 Router: Created src/api/v1/router.ts to centralize all v1 logic.
  • Versioned Mounting: Migrated stream management routes from the root to /api/v1/streams.
  • Infrastructure Headers: Added a global middleware to the v1 router that injects:
    • X-API-Version: v1
    • Deprecation: false (Prepared for future lifecycle management).
  • Global Routes: Kept /health and /webhooks at the root level for infrastructure/webhook compatibility.

Verification

  • curl -I: Confirmed versioning headers are present in responses.
  • npm test: Verified all stream tests now point to the versioned paths.
Screenshot From 2026-03-24 20-56-15 closes #39

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 24, 2026

@Adedayo-Data Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me greatest0fallt1me merged commit c3218d6 into Streampay-Org:main Mar 25, 2026
1 check failed
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.

API versioning strategy and deprecation headers

2 participants