Describe the bug
JsonPartialWildcardMatcher with "Regex": true does not match a JSON body field containing an ISO-8601 date string when the mapping pattern uses a regex for that field.
Expected behavior:
An existing static mapping in our project was working, and then stopped matching when upgrading from version 2.0 to 2.10. Working on pinned 2.2
First noticed breakage on our CI/CD through usage of Wiremock.Net Test Container when it pulled 2.10 image.
Below is a minimal example demonstrating the issue:
Test to reproduce
Example Static Mapping
{
"Guid": "11111111-1111-1111-1111-111111111111",
"Request": {
"Path": {
"Matchers": [
{
"Name": "ExactMatcher",
"Pattern": "/test"
}
]
},
"Methods": [
"POST"
],
"Headers": [
{
"Name": "Content-Type",
"Matchers": [
{
"Name": "ExactMatcher",
"Pattern": "application/json"
}
]
}
],
"Body": {
"Matcher": {
"Name": "JsonPartialWildcardMatcher",
"Pattern": {
"date": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$",
"id": 1
},
"Regex": true
}
}
},
"Response": {
"StatusCode": 200,
"Body": "matched"
}
}
Example Request
curl -i \
-X POST "http://localhost:9091/test" \
-H "Content-Type: application/json" \
-d '{"date":"2026-06-09T22:23:18.53421+00:00","id":1}'
Result
HTTP/1.1 404 Not Found
No matching mapping found
Describe the bug
JsonPartialWildcardMatcher with "Regex": true does not match a JSON body field containing an ISO-8601 date string when the mapping pattern uses a regex for that field.
Expected behavior:
An existing static mapping in our project was working, and then stopped matching when upgrading from version
2.0to2.10. Working on pinned2.2First noticed breakage on our CI/CD through usage of
Wiremock.Net Test Containerwhen it pulled 2.10 image.Below is a minimal example demonstrating the issue:
Test to reproduce
Example Static Mapping
{ "Guid": "11111111-1111-1111-1111-111111111111", "Request": { "Path": { "Matchers": [ { "Name": "ExactMatcher", "Pattern": "/test" } ] }, "Methods": [ "POST" ], "Headers": [ { "Name": "Content-Type", "Matchers": [ { "Name": "ExactMatcher", "Pattern": "application/json" } ] } ], "Body": { "Matcher": { "Name": "JsonPartialWildcardMatcher", "Pattern": { "date": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$", "id": 1 }, "Regex": true } } }, "Response": { "StatusCode": 200, "Body": "matched" } }Example Request
Result
HTTP/1.1 404 Not Found
No matching mapping found