Skip to content

Commit

Permalink
Merge pull request #4 from wiremock/oleg-nenashev-patch-1
Browse files Browse the repository at this point in the history
Minor documentation cleanup
  • Loading branch information
oleg-nenashev authored Nov 30, 2023
2 parents 472eff0 + e375271 commit 0644b2b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# wiremock-faker-extension
Uses https://github.com/datafaker-net/datafaker to generate random, fake data for using in WireMock responses.
# Faker Extension for WireMock

Uses [Data Faker](https://github.com/datafaker-net/datafaker) to generate random, fake data for using in WireMock responses.

## Usage

### Step 1: Add to your build file

For Maven users:

```xml
Expand All @@ -20,16 +22,20 @@ For Gradle users:
dependencies {
implementation 'org.wiremock:wiremock-faker-extension:0.1.0'
}
```

### Step 2: Register the extension with your server

Then, register this extension as you would any other:

```java
new WireMockServer(wireMockConfig().extensions(RandomExtension.class));
```

### Step 3: Use it in your stubs!

```yaml
{{ random 'Name.first_name' }}
```

This will generate random first names in the `en-US` locale for every request.

0 comments on commit 0644b2b

Please sign in to comment.