When specifying an example UUID using the Groovy uuid matcher, e.g.:
import au.com.duis.pact.consumer.groovy.Matchers
// omitted...
id Matchers.uuid('88aee6ad-bff6-4e11-ae5c-626f00ad13a0')
I expect the same example value to be present in the generated Pact file and the json returned in the HTTP response.
However, whilst the example value is written to the Pact file, a different value is returned in the HTTP response.
I believe the problem is in UuidMatcher::getGenerator. I think the implementation should be:
Generator getGenerator() {
value == null ? new UuidGenerator() : null
}
I was planning on submitting a Pull Request, but I had trouble building the project.
You are correct, that should be changed. I'll update it for you.
Fix has been released with version 3.5.11