3 ms·
> If you then break the API's backwards compatibility by, say, removing a field, then your API will visibly break That's a different issue. Fields going missin
by bpicolo 9y ago
> If you then break the API's backwards compatibility by, say, removing a field, then your API will visibly break
That's a different issue. Fields going missing is definitely something I want to cause big problems.
I do mean consumers (e.g. unmarshalling JSON responses from APIs), as the typical mechanism to support backwards compatibility is by adding keys. Otherwise you can't upgrade ever without entirely new API versions, and you force lockstep for deployments. Needing new data is a common thing - maybe you have user endpoint that's not returning <some_flag> that you added that you now want in some new service. Bumping APIs for every added field would get unwieldy fast and you'll have services scattered among many API 'versions'.
It's just like in protobuf. In protobuf (or most other service-to-service serialization libs), adding a new field is not backwards incompatible.