Consumer-Driven Contracts is an interesting approach to the design and verification of API endpoints. The basic idea behind this is that the consumer decides how the API should work, not the server. Scary, isn’t it?
Creating REST endpoints has become pretty popular. All these microservices, APIs, simple backend applications for the frontend javascript apps often use REST for communication. But sometimes, requests that are made toward them may have errors. Bad format, missing required values, missing properties. How to handle it? Let’s see.