Skip to content

Reproduction of a bug in WireMock with the matcher serialization

Notifications You must be signed in to change notification settings

abelk2/wiremock-matcher-bug

Repository files navigation

WireMock matcher serialization bug

Running this example requires Java 21

  1. To start, run the app with the following command:
     ./gradlew run
  2. Observe that the matcher passed to the stubbing fails to deserialize:
    Exception in thread "main" com.github.tomakehurst.wiremock.common.InvalidInputException: {
     "errors" : [ {
         "code" : 10,
         "source" : {
         "pointer" : "/request/bodyPatterns/0/1"
     },
         "title" : "Error parsing JSON",
         "detail" : "{\"expression\":\"$.body\",\"submatcher\":{\"matchesXPath\":{\"expression\":\"//a[@id='example-link']/@href\",\"equalTo\":\"https://example.com\"}}} is not a valid match operation"
     } ]
     }
    

About

Reproduction of a bug in WireMock with the matcher serialization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages