Skip to content

Implement API versioning with /v1 URL prefix and backward compatibility #59

Description

@nanaf6203-bit

Area: API Standards
Priority: P1 — High

Description

Hard-coded v1 paths make future API evolution difficult. Without explicit versioning, breaking changes risk breaking integrations. Add /v1/ prefix to all endpoints with a clear versioning policy and migration plan for v2.

Acceptance Criteria

  • Enable URI versioning: app.enableVersioning({ type: VersioningType.URI, defaultVersion: '1' }) in main.ts
  • All endpoints accessible under /v1/... (current unversioned paths redirect or stay for backward compat)
  • Update Swagger document to show /v1 paths in OpenAPI
  • Update Swagger UI to allow version selector
  • Add @Version('1') decorator on controllers for explicit documentation
  • Document versioning policy in docs/API_VERSIONING.md (deprecation timeline, sunset headers)
  • Tests: /v1/health and /health both return 200; v2 rejected with 404
  • Add Sunset HTTP header support per RFC 8594

Technical Notes

  • Deprecation policy: 6 months notice + 3 months grace before sunset
  • Header approach: Deprecation + Sunset headers per RFC 8594

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignP1Critical priorityenhancementNew feature or requestquality

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions