-
-
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
Introduce a flag to strictly enforce the http method #518
Comments
@RiccoFerraro in this scenario ; do you use "AllowPartialMapping"? |
Hi @StefH. Yes that is the case. |
Partial mapping is very useful, but I need to have partial mapping, only for the correct verb type |
Normally you would not use AllowPartialMapping (set it to false), only use AllowPartialMapping in special cases/scenarios. If you have troubles matching a POST request with a JSON body --> please provide a full example project, so that I can investigate it because it should work as designed. |
Hello @RiccoFerraro , Maybe as a work-around, you can define the Priority? And https://app.swaggerhub.com/apis/StefHeyenrath/WireMock/1.0.13.0#/MappingModel |
Hi @StefH , thanks for the response and for the idea. That is really cool. However, I'm not sure it works with my use case. I'm really trying to use record playback functionality as much as possible. In our case, Record/Playback is preferable because it allows us to mitigate unstable dependencies (api's). Stubbing out the endpoints becomes a maintenance nightmare with api's that change frequently. Is priority something that could be set for record playback as a flag somehow? I think the (probably) better solution that you already alluded to is going to be to refactor our integration tests which use wiremock's partial mapping to instead use strict mapping. That is dependent on post body request properties being correctly matched though. Is the fix for that published to nuget.org yet? |
About your last question : check the https://github.com/WireMock-Net/WireMock.Net/blob/master/CHANGELOG.md for that. |
#504
The text was updated successfully, but these errors were encountered: