go-wiremock
go-wiremock copied to clipboard
Add transformer parameters support in response handling
Adds Transformer Parameter Support
This PR implements the Transformer Parameter feature, as documented in the WireMock response templating guide.
The change enables dynamic parameter usage in response templates, improving flexibility for customized mock responses.
Key Benefits
- Supports custom parameters in response templates
- Enables finer control over dynamic responses in tests/mocks
- Maintains compatibility with WireMock's core functionality
Usage Example
stubRule := Get(URLPathTemplate("/templated")).
WillReturnResponse(
NewResponse().
WithStatus(http.StatusOK).
WithTransformers("response-template").
WithTransformerParameter("MyCustomParameter", "Parameter Value"),
)