I have an endpoint with the following response:
{
"id": 1,
"status": "ACTIVE"
}
The possible values for status are the following: ACTIVE, INACTIVE, DELETED. To check the schema I tried the following:
* def statusValues = ["ACTIVE", "INACTIVE", "DELETED" ]
* def schema =
"""
{
"id" : #number,
"status" : '#(^*statusValues)'
}
"""
And to validate I use the following sentence:
Then match response == schema
But it doesn't work. This is the error
actual: 'ACTIVE', expected: ["DELETED","ACTIVE","INACTIVE"], reason: actual value is not list-like
Can you help me, please?