Wiremock: Feature request: Support handlebars templates in body file paths

Created on 11 Jun 2018  路  4Comments  路  Source: tomakehurst/wiremock

Motivation: map requests to pre-defined responses, stored in files.
E.g.
stubFor(get(urlPathMatching("/resource/\w*")).willReturn(
ok().withTransformers(ResponseTemplateTransformer.NAME)
.withBodyFile("response/{{request.requestLine.path.[2]}}.json")));

Feature request

Most helpful comment

Not yet, but will be soon. Couple of other things to add before I push a release.

All 4 comments

Thanks! i need this. is this in a build of the standalone jar? Ahh... looks like it's not in a release yet. I'm not sure what you're planning on including with 2.19, so i'll just try to build the JAR until then.

Not yet, but will be soon. Couple of other things to add before I push a release.

@tomakehurst, do you have an idea when this feature will be released (in the stand-alone version)?

Fixed in 8a25659f2f854531b673db73937d60785609d5c6

Was this page helpful?
0 / 5 - 0 ratings