====test==== When two examples of the same request are specified in a Postman Collection and there is a difference between request bodies Prism can reject the request which is not compatible with any of example bodies ====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": "{\"to\": \"344455434\",\"type\": \"image\",\"recipient_type\": \"individual\",\"image\": {\"caption\":\"Quo Vadis\",\"id\":\"2bd2826a-c9ed-431d-beb6-f0eed5c24382\"}}" }, "method": "POST" }, "response": [ { "code": 200, "description": "OK", "header": [ { "key": "Content-Type", "value": "text/plain" } ], "body": "ok" } ] }, { "id": "3b4f5a70-2a8f-46ba-a04b-a6f80621ad3e", "request": { "url": { "path": ["path"] }, "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\"to\":\"342334535335\",\"type\":\"text\",\"recipient_type\":\"individual\",\"text\": {\"body\":\"Welcome\"}}" }, "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 '{"to":123,"type":"image","recipient_type":"individual"}' ====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","to"],"severity":"Error","code":"type","message":"Request body property to must be string"},{"location":["body","to"],"severity":"Error","code":"type","message":"Request body property to must be string"},{"location":["body"],"severity":"Error","code":"anyOf","message":"Request body must match a schema in anyOf"}]}