-
-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response body is missing in generated pact file when IBodyResponseBuilder.WithBody is used #784
Comments
@shack05 https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions |
Hi,
|
Can you open a new issue for this:
I'll merge the PR. For now just keep using the preview version, in some time a new official version will be released. |
Describe the bug
If I use the
IBodyResponseBuilder.WithBody
method to specify a response based on a string and then generate a pact file then the pact file will not include the response body.If I use
WithBodyAsJson
the response body is defined as expected in the pact file.Expected behavior:
The response body is defined in the pact file.
Test to reproduce
Expected pact:
Actual pact:
The resulting pact file is:
Other related info
Wiremock version 1.5.3
The reason I am using
WithBody
rather thanWithBodyAsJson
is because, as far as I am aware, the json I am trying to describe cannot be declared as an anonymous object because some json property names start with a dollar sign and some property names include colons. Is there an alternative to usingWithBody
such as being able to configure a json serializer to be used in theWithBodyAsJson
method?The text was updated successfully, but these errors were encountered: