Hello all How does pactflow contracts deal with ap...
# pactflow
f
Hello all How does pactflow contracts deal with api versioning. For example a service has a v1/endpoint and v2/endpoint with slight modifications. Both with consumer-driven contract tests and bi-directional ones?
m
It should handle them, how do you version - with a path prefix or otherwise?
f
something like api/v{version}/blah/blah
m
From memory, the variable part needs to be a whole path segment, and not just a sub part. That is, the
v
should also be part of
{version}
. I think you could then apply a regex constraint on that path variable
f
Ah, that part was for templating
Final url is V1/blah/blah
V2/blah/blah