Prerequisites
- A running project with at least
v1inkeja.versioning.ts - An existing route such as
GET /helloonv1
Steps
1. Register the new version
Editkeja.versioning.ts:
releasedAt may be YYYY-MM-DD, DD-MM-YYYY, or a unix timestamp.
2. Add a v2-only route (or override)
Create a new export or file for the changed behavior:v1 route in place.
3. Check both callers
v1 keeps the old body. v2 returns the new body.
4. Confirm fallback on an unchanged path
Ifv2 has no route for some other method and path that v1 still defines, GET /v2/... runs the v1 handler. Only redefine routes you intend to change.