-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
JsonMatcher not working when JSON contains a DateTimeOffset #356
Comments
This looks a lot like #347 I'll investigate the JsonMatcher code... |
@JoshKeegan
|
Will take a look, thanks! |
I don't have any automatic previews for docker available. Can you maybe also take a look at the PR -> #358 |
Alright, no problem, I'll try and use the nuget package or create a docker image myself. RE the PR: looks good & looks like it will solve this problem! Have left one comment, but it's probably more about my lack of understanding of how it works 👍 |
Currently I've two builds : a build to build WireMock code and do tests and publish to MyGet. And I've a separate build to only create (latest + versioned) docker images and publish these. So I've to modify the the first build, however I dont want to buidl a docker always, takes too much time... I've to think on that. |
Fair enough, I didn't expect it to take very long to make the image. |
Building docker Linux takes ~3 minutes. |
Taken a quick look at the build code for the linux container (I can't see the actual pipeline linked anywhere?) & I'd imagine the biggest slow down will be pulling the nuget packages. As it's running on a hosted agent there isn't a whole lot we could do about this though :( Only thing of note is that it looks like the code might be being built twice. It's using a multi-stage dockerfile and the first image handles the build (via Can't imagine that will save much time, but it's better than nothing. I'd be interested to see a build log to see what actually takes the time though. |
I can confirm that your fix has worked for me! |
"Build StandAlone.NETCoreApp" is probably there to quickly check if the code can build. Cool that it works, I will close this issue and a new official NuGet + docker will be released in few days. Just keep watching this project or dockerhub. |
Hi,
I'm trying to match wiremock match on the body of an incoming POST, and am having trouble with DateTimeOffsets.
If we start with the example from the wiki: https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#json-jsonmatcher
everything works as expected. A request to
/jsonmatcher1
with the body:works as expected and gives the response.
When I delete that mapping and add a new one with a
DateTimeOffset
property in the body:and send the same request as before, but now with body:
it doesn't work (returns
{"Status": "No matching mapping found"}
).I assume wiremock.net is doing some special processing on these
DateTimeOffset
values and it isn't working in this case, or am I doing something wrong?Also: Is there any way of making wiremock.net treat these as strings and just compare them as strings? For my current use-case that would suffice.
Cheers,
Josh
The text was updated successfully, but these errors were encountered: