API Versioning
API versioning strategy, deprecation policies, and migration guidance.
Current Version
The Ever Gauzy API is currently unversioned — all endpoints are served at /api/.
https://api.yourdomain.com/api/employee
Versioning Strategy
When breaking changes are introduced, the API will adopt URI-based versioning:
https://api.yourdomain.com/api/v1/employee
https://api.yourdomain.com/api/v2/employee
NestJS Versioning Support
app.enableVersioning({
type: VersioningType.URI,
defaultVersion: "1",
});
Per-Controller Versioning
@Controller({ path: "employee", version: "2" })
export class EmployeeV2Controller {
// v2 endpoints
}
Per-Endpoint Versioning
@Get()
@Version('1')
findAllV1() { ... }
@Get()
@Version('2')
findAllV2() { ... }
Deprecation Policy
| Phase | Duration | Action |
|---|---|---|
| Announcement | — | Release notes, docs update |
| Deprecated | 6 months | Sunset header added, warnings logged |
| Removed | — | Endpoint returns 410 Gone |