Does Your API Design Prevent Breaking Changes?¶
Type: Structure
Category: API
Audience: Engineers defining public interfaces, backend/FE integration contracts, or versioning policies
đ What This Perspective Covers¶
APIs arenât functionsâtheyâre promises.
And promises must not break.
- Field removals, enum expansions, nullability changesâsmall tweaks can ruin real systems
- Compatibility is about trust: client code expects you to change carefully
â ď¸ Breaking Change Patterns¶
- Removing or renaming response fields without fallback
- Changing default values or error structures
- Expanding enums without guarding old clients
- Using same endpoint name for incompatible behavior
â Better Compatibility Design¶
- Define schema evolution policy (additive, backward-safe)
- Document âdeprecated-but-presentâ as a lifecycle stage
- Use explicit versioning in API path or header
- Maintain changelog with client-visible impact annotations
- Validate compatibility in CI using schema diffing
đ§ Key Principle¶
Stability is not about freezing.
Itâs about changing predictablyâand visibly.
â FAQ¶
-
Q: Canât we just fix clients when something breaks?
A: Not if the clients are mobile apps, third parties, or live dashboards. -
Q: Should we version every change?
A: Noâbut you should track every change.