extension for rendering velocity templates for stubbed responses.
Java Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

wiremock-velocity-transformer

transformer used to render velocity templates for stubbed responses.

To use within a custom Wiremock Java implementation

  • Include wiremock-velocity-transformer in your project

Maven

<dependency>
  <groupId>com.github.adamyork</groupId>
  <artifactId>wiremock-velocity-transformer</artifactId>
  <version>1.4</version>
</dependency>

Gradle

dependencies {
    compile group: "com.github.adamyork", name: "wiremock-velocity-transformer", version: "1.4"
}
new WireMockServer(wireMockConfig().extensions("com.github.adamyork.wiremock.transformer.VelocityResponseTransformer",));

or

new WireMockServer(wireMockConfig().extensions(VelocityResponseTransformer.class));

or 

new WireMockServer(wireMockConfig().extensions(new VelocityResponseTransformer()));

To use in conjuction with Wiremock Standalone Jar

http://wiremock.org/docs/running-standalone/

  • From the command line NOTE : Change the versions of the jars to match the one's you have downloaded.
java -cp "wiremock-velocity-transformer-standalone-1.4.jar:wiremock-standalone-2.1.12.jar" com.github.tomakehurst.wiremock.standalone.WireMockServerRunner --verbose --extensions com.github.adamyork.wiremock.transformer.VelocityResponseTransformer