I want to validate coming response with schema in Postman. I'm using jsonSchema. But I can't use anyOf parameters in schema. For example I have an object in schema
"rmState":{
"anyOf": [
{
"type": "string",
"enum": [
"REGISTERED",
"DEREGISTERED"
]
},
{
"type": "string"
}
]
}
I expect that rmState can only have this enum parameters. But when I validate response with
pm.response.to.have.jsonSchema(schema); validation passes even rmState got any other string from enum.Validation fails only if I change rmState to int. What am I missing for this validation? Thanks for helps.