Skip to content

Feat/api versioning#303

Merged
RUKAYAT-CODER merged 6 commits into
rinafcode:mainfrom
Chinonso-Peter:feat/api-versioning
Apr 23, 2026
Merged

Feat/api versioning#303
RUKAYAT-CODER merged 6 commits into
rinafcode:mainfrom
Chinonso-Peter:feat/api-versioning

Conversation

@Chinonso-Peter
Copy link
Copy Markdown
Contributor

Implemented.

The API now uses a clear header-based versioning strategy. I wired Nest header versioning into main.ts (line 1), replaced the stubbed common module with real validation middleware in api-versioning.module.ts (line 1), and simplified the shared version helpers/interceptor in api-version.interceptor.ts (line 1). Versioned routes now require X-API-Version, accept 1 or v1, reject missing/invalid/unsupported values early, and echo the resolved version back on the response. I also marked root, health, metrics, webhook, and Swagger paths as version-neutral so infra/docs traffic keeps working.

I documented the strategy in README.md (line 129), added matching Swagger text in src/config/swagger.config.ts (line 1), and added env validation for versioning config in src/config/env.validation.ts (line 1). There’s also a small helper spec in api-version.interceptor.spec.ts (line 1).

Verification: I could not complete a clean npm run typecheck in this workspace because the compiler environment is missing the jest and node type definitions, so tsc stops before checking project code. I also didn’t run lint for the same local tooling reason.

closes #288

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 22, 2026

@Chinonso-Peter 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

# Conflicts:
#	src/common/interceptors/api-version.interceptor.ts
@RUKAYAT-CODER RUKAYAT-CODER merged commit d320b4e into rinafcode:main Apr 23, 2026
3 of 7 checks passed
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

2 participants