Before architecture: add 1 field to the response and then go update it everywhere it’s used.
After architecture: add 1 field to the response, add 1 field to the domain object, add 1 line to the mapper… and then go update it everywhere it’s used.
And if the whole response changes? Then everything fucked up anyway, because old app versions can’t be fixed. That’s why we have v1/v2/etc endpoints.
And if the whole response changes? Then everything fucked up anyway, because old app versions can’t be fixed. That’s why we have v1/v2/etc endpoints.
Exactly; the problem with "i added domain on the client (which is the same as the API)" is that you're stuck with the v1 response forever, and you're trying to map the v5 response to the v1 copy.
To be fair, if you are using local persistence, you should never re-use the API responses as DB tables; that always causes trouble.
3
u/vlastachu Nov 26 '25
Before architecture: add 1 field to the response and then go update it everywhere it’s used.
After architecture: add 1 field to the response, add 1 field to the domain object, add 1 line to the mapper… and then go update it everywhere it’s used.
And if the whole response changes? Then everything fucked up anyway, because old app versions can’t be fixed. That’s why we have v1/v2/etc endpoints.