Bug: WireMock.Net is not matching application/json http requests using JSONPathMatcher
The JSONPathMatcher does not match a json body request. (Using the IRequestBuilder .WithBody()) This is because the RequestMessageBodyMatcher only uses the .Body property and not the .BodyAsJson property. to get working, either Body and BodyAsJson must be filled with the body string from request.
This was broken during the last changes. I will take a look.
Hello @aledaccas
I did fix it, however, can you please take a look at my code https://github.com/WireMock-Net/WireMock.Net/compare/json?expand=1 before I commit and create a new NuGet ?
@StefH Is it possible to open a PR, so conversation on the changes is easy?
@joostvanhassel I did add you as reviewer to a the PR. https://github.com/WireMock-Net/WireMock.Net/pull/92
Hi Stef I’ll take a look today.
Regards,
Stef, I’d a look and for me It’s ok.
You’ve created more interfaces inheriting from IMatcher passing object as parameter for IsMatch method, adjusted the Matchers and changed the RequestMessage*Matcher classes to adapt to this new matchers. Sweet! ☺
Regards.
Aledaccas
From: Alexandre Daccas Mendonça Sent: quinta-feira, 22 de fevereiro de 2018 09:14 To: 'WireMock-Net/WireMock.Net' [email protected]; WireMock-Net/WireMock.Net [email protected] Cc: Mention [email protected] Subject: RE: [WireMock-Net/WireMock.Net] Bug: WireMock.Net is not matching application/json http requests using JSONPathMatcher (#91)
Hi Stef I’ll take a look today.
Regards,