Palak
03/22/2023, 1:50 PMAaron
03/22/2023, 1:59 PMpriority
to force WireMock to check more specific mappings before more generic mappings. One moment, getting an example.{
"mappings": [
{
"priority": 1,
"request": {
"url": "xyz",
"method": "POST",
"bodyPatterns": [
{
"matchesXPath": {
"expression": "abc/id/text()",
"equalTo": "12345"
}
}
]
},
"response": {
"bodyFileName": "xyz/Success_default-rsp.txt"
}
},
{
"priority": 5,
"request": {
"url": "xyz",
"method": "POST"
},
"response": {
"bodyFileName": "xyz/some_other_response.txt"
}
}
]
}
xyz
with that abc/id === 12345
will match on the Priority 1, and any other requests to xyz
will match on the Priority 5.