Tapan Gujjar
08/21/2023, 6:55 PMv2.27.2
. The request is as below:
{
"request": {
"method": "POST",
"urlPattern": "sampleRequest",
"headers": {
"Authorization": {
"matches": "\\btestStandardAuthCode(Warn)?\\b"
}
},
"bodyPatterns": [
{
"matchesJsonPath": {
"expression": "$.date",
"and": [
{
"before": "2022-01-01T00:00:00"
},
{
"after": "2020-01-01T00:00:00"
}
]
}
}
]
},
"response": {
"status": 200,
"bodyFileName": "body/sampleresponse.json"
}
}
However when I running it, I am getting the below error
com.github.tomakehurst.wiremock.standalone.MappingFileException:
{"expression":"$.date","and":[{"before":"2022-01-01T00:00:00"},{"after":"2020-01-01T00:00:00"}]} is not a valid match operation
Tom
08/21/2023, 8:03 PM