Pick the fix
You must change price from a number of euros to an object with amount and currency. Least disruptive approach?
Hint 1 of 1
Can old clients keep reading what they read today?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Add a new price_v2 object field, keep price as is, deprecate it with a date
Correct. Additive change; old clients keep working until they move.
Old clients still read price as a number. Adding a new field and retiring the old one on a published date lets both kinds of client work during the move.
Why not the others?
- B Change
pricein place and tell clients. Breaks every client that reads it as a number. - C Remove
priceand addamountandcurrency. Removing a field breaks old clients. - D Ship it as a minor version. The number on the version doesn't make a breaking change safe.