====test==== When request JSON body is invalid return 422 ====spec==== { "info": { "name": "Test" }, "item": [ { "id": "3b4f5a70-2a8f-46ba-a04b-a6f80621ad3f", "request": { "url": { "path": ["path"] }, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\"id\":100,\"status\":\"open\"}" }, "method": "POST" }, "response": [ { "code": 200, "description": "OK", "header": [ { "key": "Content-Type", "value": "text/plain" } ], "body": "ok" } ] } ] } ====server==== mock -p 4010 ${document} ====command==== curl -i -X POST http://localhost:4010/path -H "Content-Type: application/json" --data '{ "id": "ooopsie!" }' ====expect==== HTTP/1.1 422 Unprocessable Entity content-type: application/problem+json {"type":"https://stoplight.io/prism/errors#UNPROCESSABLE_ENTITY","title":"Invalid request","status":422,"detail":"Your request is not valid and no HTTP validation response was found in the spec, so Prism is generating this error for you.","validation":[{"location":["body","id"],"severity":"Error","code":"type","message":"Request body property id must be integer"}]}