Jayanth Culli
11/07/2023, 4:51 PMRequest was not matched
=======================
-----------------------------------------------------------------------------------------------------------------------
| Closest stub | Request |
-----------------------------------------------------------------------------------------------------------------------
|
get-aadhaar-details-success-teen |
|
POST | POST
[path regex] /okyc/v1/digio/init | /okyc/v1/digio/init
|
$.things[?(@ =~ /Required.*/i)] | <<<<< Body does not match
| { "things": "Required" }
|
-----------------------------------------------------------------------------------------------------------------------
{
"name": "get-aadhaar-details-success-teen",
"request": {
"method": "POST",
"urlPathPattern": "/okyc/v1/digio/init",
"bodyPatterns": [
{
"matchesJsonPath" : "$.things[?(@ =~ /Required.*/i)]"
}
]
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"jsonBody": {
"success": true,
}
}
curl --location 'localhost:8080/okyc/v1/digio/init' \
--header 'Content-Type: application/json' \
--data '
{ "things": "Required" }
'
Faye Salwin
11/07/2023, 5:00 PM{
"request": {
...
"queryParameters" : {
"search_term" : {
"matches" : "^(.*)wiremock([A-Za-z]+)$"
}
}
...
},
...
}
this seems to be the json syntax for that kind of checkJayanth Culli
11/07/2023, 5:00 PMFaye Salwin
11/07/2023, 5:01 PMJayanth Culli
11/07/2023, 5:02 PM{
"things": "Required_thing"
}
I'm trying to match things
key for values starting with Required
Faye Salwin
11/07/2023, 5:02 PMJayanth Culli
11/07/2023, 5:04 PM{
"request": {
...
"bodyPatterns" : [ {
"matchesJsonPath" : "$.things[?(@.name == 'RequiredThing')]"
} ]
...
},
...
}
where I'm matching things.name == RequiredThing{
"request": {
...
"bodyPatterns" : [ {
"matchesJsonPath" : "$.things[?(@ == 'RequiredThing')]"
} ]
...
},
...
}
where I'm trying to match things with RequiredThingFaye Salwin
11/07/2023, 5:08 PMJayanth Culli
11/07/2023, 5:09 PMFaye Salwin
11/07/2023, 5:10 PMJayanth Culli
11/07/2023, 5:11 PMFaye Salwin
11/07/2023, 5:12 PM"$[?(@.things =~ /Required.*/i)]"
I thinkLee Turner
11/07/2023, 6:23 PMJayanth Culli
11/08/2023, 2:23 AM