WireMock-Net / WireMock.Net

WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.
Apache License 2.0
1.39k stars 207 forks source link

Docs: Documentation is misleading/incomplete for BodyAsFile #1106

Closed dotnetprofessional closed 4 months ago

dotnetprofessional commented 4 months ago

Describe the bug

The sample code at:

https://github.com/WireMock-Net/WireMock.Net/wiki/Response-Templating#mapping-json-example-using-handlebarsnet

Is incomplete which leads to a very frustrating experience. Tried for an hour or two to get transformers working until I found the following issue:

https://github.com/WireMock-Net/WireMock.Net/issues/386

The docs need to be updated to include that we also need to have the following property for this to work (btw why introduce another property?):

"UseTransformerForBodyAsFile": true

I did notice (now I know what to look for), a reference at:

UseTransformerForBodyAsFile

However, that should be a little clearer too, as it doesn't call out its to be included in the response.json file.

Expected behavior:

Docs provide clear and working example, which they don't.

StefH commented 4 months ago

documentation has been updated