diff --git a/Request-Matchers.md b/Request-Matchers.md index de76780..a26e90b 100644 --- a/Request-Matchers.md +++ b/Request-Matchers.md @@ -154,6 +154,21 @@ server { "things": { "name": "Wiremock" } } ``` +### Jmes Path (JmesPathMatcher) +The JMESPath language is described in an ABNF grammar with a complete specification. +A JSON body will be considered to match a path expression if the expression returns either a non-null single value (string, integer etc.), or a non-empty object or array. + +#### C# +```csharp +var server = WireMockServer.Start(); +server + .Given( + Request.Create().WithPath("/jmespath_example").UsingGet() + .WithBody(new JmesPathMatcher("things.name == 'RequiredThing")); + ) + .RespondWith(Response.Create().WithBody("Hello")); +``` + ### XPathMatcher Deems a match if the attribute value is valid XML and matches the XPath expression supplied. An XML document will be considered to match if any elements are returned by the XPath evaluation.