So I have a response with the field role is of type enum
'{
"content": [
{
"id": "1",
"roles": [],
},
{
"id": "2",
"roles": [
"manager"
]
},
{
"id": "3",
"roles": [
"client"
],
}
],
}'
I want to validate that the role in response is of type enum so I was trying something like
* match each response..role == ['#? enumRoles.contains(_)'}
But kept getting errors. The solution I was trying is dervied from How to validate multiple possible values in Karate using a schema. Then I found out that the accepted solution there was also yielding unexpected end of file and message not supported errors.
Any help is appreciated. I am using 1.2.0.RC1