mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Response Body Does Not Evaluate Multiple Handlebars Templates #701
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @adambricelis on GitHub (Jul 8, 2025).
Originally assigned to: @StefH on GitHub.
Describe the bug
When the mapping contains multiple handlebars templates in the response body, the response only includes the evaluation of the first handlebars template.
Expected behavior:
WireMock should evaluate all of the handlebars templates in the mapping and include them in the response.
Test to reproduce
Mapping:
Request:
GET http://{WIREMOCK_SERVER_HOST}/path0/path1Expected response:
Actual response:
Other related info
This issue only occurs when the handlebars template is the prefix of a field in the response body. Adding any characters before the request path segment resolves the issue.
Mapping:
Request:
GET http://{WIREMOCK_SERVER_HOST}/path0/path1Response:
Related issue: #1212
@StefH commented on GitHub (Jul 12, 2025):
https://github.com/wiremock/WireMock.Net/pull/1329