Fixed wrong condition on jsonpath for rest docs

fixes #298
This commit is contained in:
Marcin Grzejszczak
2017-06-06 13:28:31 +02:00
parent b158ed4919
commit 325afbe3ec

View File

@@ -169,7 +169,7 @@ public class WireMockSnippet implements Snippet {
private MappingBuilder bodyPattern(MappingBuilder builder,
String content) {
if (this.jsonPaths != null) {
if (this.jsonPaths != null && !this.jsonPaths.isEmpty()) {
for (String jsonPath : this.jsonPaths) {
builder.withRequestBody(matchingJsonPath(jsonPath));
}