json file: ```{ "mappings": [ { "reque...
# help
a
json file:
Copy code
{
  "mappings": [
    {
      "request": {
        "urlPath": "/things",
        "method": "GET",
        "queryParameters": {
          "id": {
            "hasExactly": [
              {
                "equalTo": "1"
              },
              {
                "contains": "2"
              },
              {
                "doesNotContain": "3"
              }
            ]
          }
        }
      },
      "response": {
        "status": 200
      }
    }
  ]
}
command used to run:
java -jar ~/Downloads/wiremock-jre8-standalone-2.35.0.jar --port 80 --https-port 443 -global-response-templating
Error:
Copy code
Exception in thread "main" com.github.tomakehurst.wiremock.standalone.MappingFileException: Error loading file mocks/./mappings/userConfigSvc/get-user-config.json:
{"hasExactly":[{"equalTo":"1"},{"contains":"2"},{"doesNotContain":"3"}]} is not a valid match operation
	at com.github.tomakehurst.wiremock.standalone.JsonFileMappingsSource.loadMappingsInto(JsonFileMappingsSource.java:126)
	at com.github.tomakehurst.wiremock.core.WireMockApp.loadMappingsUsing(WireMockApp.java:224)
	at com.github.tomakehurst.wiremock.core.WireMockApp.loadDefaultMappings(WireMockApp.java:220)
	at com.github.tomakehurst.wiremock.core.WireMockApp.<init>(WireMockApp.java:112)
	at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:70)
	at com.github.tomakehurst.wiremock.standalone.WireMockServerRunner.run(WireMockServerRunner.java:62)
	at com.github.tomakehurst.wiremock.standalone.WireMockServerRunner.main(WireMockServerRunner.java:133)
I have taken this example from the documentation here . Still I am getting this error. Can someone please help?
t
This is actually only available in 3.x. Seems it’s got into the 2.x docs by mistake.
👍 1
a
Is there any way to support multiple values of a single request param in 2.x? If yes, where can I find the docs for the same?
t
I’m afraid not, you’ll need to upgrade to 3 for this. Don’t be put off by the beta label - it’ll be out of beta very soon and we only intend very minor (non-breaking) changes between now and then.
a
Thanks, Tom, Will upgrade to the latest version as you recommended.