💻 Development Guide

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

PhaseDurationAction
Announcement—Release notes, docs update
Deprecated6 monthsSunset header added, warnings logged
Removed—Endpoint returns 410 Gone

Deprecation Headers

Sunset: Sat, 01 Jun 2025 00:00:00 GMT
Deprecation: true
Link: <https://docs.gauzy.co/migration>; rel="successor-version"

GraphQL Versioning

GraphQL APIs evolve through field-level deprecation:

type Employee {
  name: String @deprecated(reason: "Use firstName and lastName")
  firstName: String
  lastName: String
}

Edit this page

Copyright © 2023-Present Ever Co. LTD.Docs by Sourcey