render_macros |
---|
Uses Data Faker to generate random, fake data for using in WireMock responses.
For Maven users:
<dependency>
<groupId>org.wiremock.extensions</groupId>
<artifactId>wiremock-faker-extension</artifactId>
<version>0.2.0</version>
</dependency>
For Gradle users:
dependencies {
implementation 'org.wiremock.extensions:wiremock-faker-extension-standalone:0.2.0'
}
Then, register this extension as you would any other:
new WireMockServer(wireMockConfig().extensions(RandomExtension.class));
{% raw %}
{% endraw %}
This will generate random first names in the en-US
locale for every request.
This library brings net.datafaker:datafaker
as transitive dependency, which may result in conflicts at building time.
If that's the case, the net.datafaker:datafaker
dependency needs to be excluded.
For a full reference of the available keys, see the Reference Documentation.