diff --git a/Request-Matching.md b/Request-Matching.md index 3c8ea39..ac48190 100644 --- a/Request-Matching.md +++ b/Request-Matching.md @@ -26,6 +26,7 @@ At this moment these matchers are supported: * [WildcardMatcher](https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#wildcardmatching-wildcardmatcher) * ContentTypeMatcher(🚧) * [NotNullOrEmptyMatcher](https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#notnulloremptymatcher) +* [CustomMatcher](https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#CustomMatcher) ## Exact matcher (ExactMatcher) Can be used to exactly match a string or object. @@ -352,6 +353,31 @@ server ### NotNullOrEmptyMatcher NotNullOrEmptyMatcher is used for Body matching. This matcher will return a match of the body is not null (BodyAsBytes, BodyAsJson, BodyAsString) or empty (BodyAsBytes, BodyAsString). +### CustomMatcher +It's also possible to use a custom mapper with your own name. + +#### JSON Mapping Option +``` js +{ + "Guid": "67ae335b-5d79-42dc-8ca7-236280ab9211", + "Priority": 0, + "Request": { + "Path": { + "Matchers": [ + { + "Name": "MyCustomMatcher", + "Pattern": "abc" + } + ] + } + "Body": {} + }, + "Response": { + "Body": "custom match" + } +} +``` + ### Reversing the match behaviour with `MatchBehaviour.RejectOnMatch`