Hi Team,
I have set up a wiremock standalone server and used response templating to get filename from {{ request.query }} but i want to throw a default JSON file as a response if the file does not exist .
{
"priority" : 1,
"request": {
"urlPathPattern": "/search/items",
"method": "GET",
"queryParameters": {
"id": {
"contains": "doc"
},
}
},
"response" : {
"status" : 200,
"bodyFileName" : "response-{{jsonPath request.query '$.id'}}.json",
"headers": {
"Content-Type": "application/json"
}
}
}
Any help on the above thread, about how to make another mapping handle this when no file found or how to give default filename !?
Thanks :)