Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.39 KB

File metadata and controls

29 lines (20 loc) · 1.39 KB

Health Endpoints Expansion TODO

Plan

Expand GET /api/health and add GET /api/health/deep to include DB connectivity, migration status, background job system health, and (if enabled) Horizon listener heartbeat. Keep the lightweight endpoint fast and safe for public exposure.

Steps

  • 1. Rewrite src/services/healthService.ts
  • 2. Rewrite src/routes/health.ts
  • 3. Update src/controllers/healthController.ts
  • 4. Expand src/tests/health.deep.test.ts
  • 5. Run tests to verify

API Versioning & Deprecation TODO

Plan

Introduce URL-based API versioning (/api/v1) with backward-compatible legacy aliases (/api/...). Implement deprecation headers for all legacy endpoints and document the migration path for clients.

Steps

  • 1. Create src/config/versions.ts — version constants, sunset timeline, successor-path helper
  • 2. Create src/middleware/versioning.ts — deprecation header middleware + mountVersionedRoute() helper
  • 3. Modify src/index.ts — dual-register all routes via mountVersionedRoute()
  • 4. Create docs/API_VERSIONING.md — strategy, header semantics, deprecation timeline, client migration guide
  • 5. Create src/tests/apiVersioning.test.ts — verify v1 has no headers, legacy has Deprecation/Sunset/Link
  • 6. Run tests and lint (runtime unavailable in this environment; code verified logically)