Imagine there is an endpoint GET /v1/status
which returns one of predefined statuses that are documented. For example one of [disabled
, enabled
]. The endpoint can be used by other third party services.
The problem that I see with just adding a blocked
status as is, is that third party clients will not be able to process this case or even can have something like:
if (status == 'disabled') { // do something when status disabled } else { // do something when status enabled }
Bumping a version an maintaining 2 versions does not seem like a good solution for such a small change.
What is the best approach to add a new status, for example blocked
, without breaking third party clients that might depend on this endpoint? Or what is a better way to design or document public API to avoid such problems in future?