Untitled.json
# pact-js
d
Untitled.json
y
if
name
was used by any consumers you could use
Copy code
{
"name": Object1,
"new_name": Object1,
"name2": Object2
}
until they move over to update to use
new_name
and then you could retire
name
field
d
thing is • whole js is verified ( could be solved , theoretically ) • 2 objects (
"name"
and
"new_name"
) will not be send šŸ˜ž
The expand and contract pattern
this is known thing, but not applicable now šŸ˜ž
y
Ie the provider won't update their schema to support the old and new format? and will just do it in a big bang?
d
yup
y
if so your consumer code will have to be tolerant to the fact that the property can either come from
name
or
new_name
(but would have to make the decision as to what it does if both are present, which takes precedence, especially fi they were different)
Ie the provider won't update their schema to support the old and new format? and will just do it in a big bang?
Yeah that sucks, this is where showing them how difficult it is to support at your side as a consumer, helps in discussing the impact of a change. If you have more consumers that will be affected, that can help your argument
d
this is just a string in general, just a name of the same object has been changed to more descriptive now
which brought a pain