Briefle words · Code & architecture
API versioning
Giving each incompatible version of an API its own label, often in the URL like /v1 and /v2, so old and new clients can both keep working.
Say it to an AI
Renaming weight (kg) to weightGrams is a breaking change, so ship it under /v2 using URL-based API versioning and keep /v1 byte-for-byte unchanged. Add a v2 shipment serializer, and note the v1 deprecation date in the changelog.
How an expert would brief the stronger version of “Shipment API change”.
See it
Try it as a puzzle →A pull request changes a field in a logistics API that dozens of customer integrations call.
Why: A adds app.use("/v2", v2Router) next to the untouched /v1 router; B edits the one shipment serializer every client shares and updates the test to match.
Related words
Room 5 · APIs & data
Learn “API versioning” in a five-minute lesson