mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Request body is missing in generated pact file for requests that include matching on request body #437
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 @shack05 on GitHub (Aug 12, 2022).
Describe the bug
The request body is missing in generated pact file for requests that include matching on request body.
More specifically, I am using the JsonPartialMatcher.
Expected behavior:
The generated pact file includes the expectations of the request body as specified by the matchers used in the wiremock scenario.
Test to reproduce
I'm not sure what the expected pact should look like, but I imagine request body should be included in some way.
The actual pact file is:
Other related info
WIremock version - 1.5.3-ci-16331 (from #784).
@StefH commented on GitHub (Aug 12, 2022):
The only possible solution would be that I deserialize the value from the matcher (
@"{ ""name"": ""john"" }"), so that the pact could be:Another option would be that you can add an example body like:
@StefH commented on GitHub (Aug 12, 2022):
@shack05
Can you try preview version 1.5.3-ci-16359 ?
@shack05 commented on GitHub (Aug 15, 2022):
Hi @StefH, thank you, preview 1.5.3-ci-16359 works like a charm.
@StefH commented on GitHub (Aug 15, 2022):
@shack05 Thanks for testing.
For now use the preview, in some time I'll release a new official.