-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Record request mapping outputs JsonMatcher with Patterns instead of Pattern #715
Comments
@tjpeel I think I found some issues in the JsonMatcher, this cannot handle For now I'll just change the Save code to output Can you try preview version 1.4.33-ci-15809 ? |
Thanks, sounds good. I’ll give it a try in the morning but I’m sure all will be good if it defaults to save as Pattern 👍
|
@tjpeel |
Please forgive me @StefH I was offline for the past couple of days. I have just checked now and all looks good. Thanks! |
Hi,
I collated the following example https://github.com/tjpeel/wiremock-question-jsonmatcher/blob/main/Program.cs#L23-L46
Please run the Program to see the issue.
The issue might be a misconfiguration on my part or be by design, or be a bug, which is why the example was made.
TLDR; when a request is recorded with a request body, the mapping includes a JsonMatcher with a Patterns property, yet when the mapping is used it will never match the request again as the incoming request is checked against an array (Patterns property) instead of each item in the array. Or it should have serialised the recorded request using the Pattern property instead.
Example servers from Program.cs
Many thanks
The text was updated successfully, but these errors were encountered: