====test==== When request JSON body is invalid return 422 ====spec==== swagger: '2.0' paths: /path: post: consumes: - application/json parameters: - in: body name: body schema: type: object properties: id: type: integer status: type: string enum: - open - close required: - id responses: 200: schema: type: string ====server==== mock -p 4010 ${document} ====command==== curl -i -X POST http://localhost:4010/path -H "Content-Type: application/json" --data '{ "status": "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"],"severity":"Error","code":"required","message":"Request body must have required property 'id'"},{"location":["body","status"],"severity":"Error","code":"enum","message":"Request body property status must be equal to one of the allowed values: open, close"}]}