I am currently doing something like this to match the json response with one of the schemas present in a file.
Scenario: Get sub navigation widget
Then match response == '#notnull'
Then def sub_json = '$.[*]..widget_wrappers[?(@.template == "SubNavigationWidget")]'
And def sub_widget = karate.jsonPath(response, sub_json)
Then match sub_widget[*] contains read('../data/in/sub_navigation_widget.json')
This is working as expected. But now I want to match the json response with more than one schema present in a file and return true if any condition is true. For example, I want to do something like
Then match sub_widget[*] contains read('../data/in/sub_navigation_widget.json') || read('../data/in/sub_navigation_widget_more.json')
I am still not sure about how to achieve this. I tried multiple things but nothing worked. Please help me out.