Skip to content

Commit

Permalink
Merge pull request #260 from wiremock/docs-updates-based-on-questions…
Browse files Browse the repository at this point in the history
…-in-community-slack

Document disabling response templating per stub
  • Loading branch information
leeturner authored Mar 12, 2024
2 parents f2f24a3 + 4dd88ba commit 05e0f33
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions _docs/response-templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ WireMockServer wm =

See [the command line docs](../standalone/java-jar/#command-line-options) for the standalone equivalents of these parameters.

Response templating can also be disabled on a per-stub basis when using the `bodyFileName` element by adding the
`disableBodyFileTemplating` parameter to the `transformerParameters` object in the stub response definition.

```json
{
"request": {
"method": "GET",
"urlPath": "/test"
},
"response": {
"status": 200,
"bodyFileName": "response.json",
"transformerParameters": {
"disableBodyFileTemplating": true
}
}
}
```

## Customising and extending the template engine

Expand Down
1 change: 1 addition & 0 deletions _docs/standalone/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ services:
image: "wiremock/wiremock:latest"
container_name: my_wiremock
volumes:
- ./extensions:/var/wiremock/extensions
- ./__files:/home/wiremock/__files
- ./mappings:/home/wiremock/mappings
entrypoint: ["/docker-entrypoint.sh", "--global-response-templating", "--disable-gzip", "--verbose"]
Expand Down

0 comments on commit 05e0f33

Please sign in to comment.