Hi Team,
So I have been trying to mock an API on my system for the URI format: "/v2/pet/aa"
What I have in my mappings.json is :
{
"request": {
"method": "GET",
"url": "/v2/pet/([0-9]*)"
},
"response": {
"status": 200,
"body": "<some-good-content>",
"headers": {
"Content-Type": "application/json"
}
}
}
I put ([0-9]*) to have only numerals coming as in the path variable.
Request was not matched
=======================
-----------------------------------------------------------------------------------------------------------------------
| Closest stub | Request |
-----------------------------------------------------------------------------------------------------------------------
|
GET | GET
/v2/pet/([0-9]*) | /v2/pet/11 <<<<< URL does not match
|
|
-----------------------------------------------------------------------------------------------------------------------
What I expected was a 200 HTTP Status along with the given body.
What is wrong with my configuration? Please correct me.