Hi there I've relativley new to the Wiremock framework. I've got a test enviroment working but I need to for our integration testing need to resolve a dynamic path such as
/test/dynamic/{dynamicpath}/help
where dynamic path is going to be a variable that I want to resolve and then present different data from using a subset of a json file such as
{ dynamicpathA : "hello", dynamicpathB "world" }
at the moment I have :
stubFor(get(urlPathMatching("/test/dynamic/{dynamicpath}/help"))
.withHeader("accept", equalTo("application/json"))
.willReturn(aResponse().withBody(readFile(RESOURCES + "test.json", Charset.defaultCharset()))));
which will return an entire json file with the full subset of data but not the individual components in relation to the dynamic uri. My question is there a way to resolve the dynamic url and return dynamic data from the json?
I hope I'm being specific enough I'll update as need be.