API Testing · Middle · Question 50 of 75
What does Postman's pm.response.to.have.jsonSchema(schema) do?
- 1Sends the schema to the server for validation
- 2Validates the response body against a JSON Schema
- 3Creates a schema from the response automatically
Show the answer
Correct answer: Validates the response body against a JSON Schema
Explanation
It turns a structure check into one assertion. Keep schemas in shared variables or files to reuse them.