feat(versioning): implement API versioning with deprecation lifecycle#236
Open
ezedike-evan wants to merge 1 commit intoStellAIverse:mainfrom
Open
feat(versioning): implement API versioning with deprecation lifecycle#236ezedike-evan wants to merge 1 commit intoStellAIverse:mainfrom
ezedike-evan wants to merge 1 commit intoStellAIverse:mainfrom
Conversation
- Add src/versioning/version.constants.ts — version registry with status, releasedAt, deprecatedAt, sunsetAt; isVersionSunset/isVersionDeprecated helpers - Add src/versioning/version-check.middleware.ts — 410 Gone for sunset versions; RFC 8594 Sunset/Deprecation headers for deprecated; beta informational header; X-Api-Version on all responses - Add src/versioning/api-version.decorator.ts — @apiversion() wraps @Version() with Swagger docs; @VersionedEndpoint() for per-handler docs - Add src/versioning/versioning.module.ts — registers middleware globally - Add src/docs/VERSIONING.md — full migration guide: v0→v1, v1→v2, renamed/removed fields, pagination changes, SDK examples in TS/Python/curl - Update src/main.ts — enable VersioningType.URI with default v1; remove stale manual GlobalExceptionFilter registration - Update src/app.module.ts — import VersioningModule
|
@ezedike-evan 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements URL-based API versioning with a full deprecation lifecycle.
v0 is sunset (410 Gone), v1 is stable, v2 is beta. All lifecycle
transitions are driven by a single version registry file.
Related Issue
Fixes #179
Type of Change
Changes Made
version.constants.ts— central version registry, lifecycle helpersversion-check.middleware.ts— 410 for sunset, RFC 8594 headers fordeprecated, beta warning,
X-Api-Versionon all responsesapi-version.decorator.ts—@ApiVersion()and@VersionedEndpoint()versioning.module.ts— NestModule registering middleware globallyVERSIONING.md— v0→v1 and v1→v2 migration guides with field renametable, removed fields, pagination changes, SDK examples
main.ts—app.enableVersioning(VersioningType.URI), removed manualfilter registration
app.module.ts— import VersioningModuleTesting
Checklist