I have created a test collection from an API specification that got created through a swagger import. Now when I perform one of those calls, postman clearly states issues if the request or response does not adhere to the API specification (json bodies).
However is there a way to have the tests on this call fail depending on this API validation? I know there is a manual way to add a test through pm.response.to.have.jsonSchema by specifying a schema myself, but that seems rather tedious and error-prone to keep that up to date with the API spec and seems like double work since postman already performs the validation. Or does this ‘to.have.jsonSchema’ support a way to link to the relevant json object in my API specification directly?