I can have a response as:
{ id: '123', name: 'foo' }`
if the user has not a dog
OR
{ id: '123', name: 'foo', dog: {id: '123', color: 'brown'} }`
if the user has a dog.
In my feature I have:
* def schema = { id: '#string', name: '#string', dog: {id: '#string', color: '#string'} }`
* match response == schema
The prb is that if I have a user without dog in response, I have this error:
path: $[0].dog, actual: null, expected: {id=#string, label=#string}, reason: actual value is null
How can I check the attribute 'dog' in my schema? Thanks