Admin API fails to create a mapping with Request Body matching
See original GitHub issueDescribe the bug
Admin API is used to create a mapping which has some sort of request body match, but other matches get created except body.
Expected behavior:
Body match should appear when querying GET __admin/mappings
.
Test to reproduce
Admin API is used to create the following mapping.
var model = new MappingModel
{
Request = new RequestModel
{
Path = "test",
Body = new BodyModel
{
Matcher = new MatcherModel
{
Name = "RegexMatcher",
Pattern = "hello"
}
}
},
Response = new ResponseModel
{
Body = "world"
}
};
await RestClient.For<IWireMockAdminApi>("http://localhost").PostMappingAsync(model);
The response from GET __admin/mappings
[
{
"Guid": "486b7f76-f29a-4928-9f16-bf6c3a2ce8f2",
"Request": {
"Path": {
"Matchers": [
{
"Name": "WildcardMatcher",
"Pattern": "test",
"IgnoreCase": false
}
]
}
},
"Response": {
"Body": "world"
}
}
]
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Unable to match desired schema for api - python
Im unable to formulate accurately enough this PUT request to the GoDaddy v1 domains api to update my A record. The only data...
Read more >Matching and filtering HTTP requests in WireMock
Matching other attributes. All request attributes other than the URL can be matched using the following set of operators.
Read more >there are no stub mappings in this WireMock instance
I found solution for this. So, basically we need create a folder called "mappings" (exact name) under the directory identified by ...
Read more >Returning stubbed HTTP responses to specific requests
A core feature of WireMock is the ability to return canned HTTP responses for requests matching criteria. These are described in detail in...
Read more >Wiremock Stubbing, Stub Verification And Proxying With ...
#3) The above command will create a mapping in Wiremock and will route all the requests URL matching “/serviceB” to host www.google.com.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed. New NuGet and Docker will be released soon.
@StefH thanks very much for your quick fix.