Don’t Waste Your Time Building Fake APIs in Code
Compare OpenAPI mock servers to writing Java, PHP, and C#
Jun 20, 2019
Prism is an open source mock server that can mimic your API’s behavior as if you already built it. Servers are generated from your OpenAPI v2/v3 (formerly known as Swagger) documents.
The waterfall model does not work well for building APIs. Learning at the very end what your potential consumers think about your software can be source of huge problems. With Prism you can move the feedback stage to the design phase of your API by providing a real server to use and play with.
Static examples in mock APIs can bias the way you write the code and test the API. Prism can generate dynamic random examples based on your API description, so the examples are always valid.
Prism validates both request and response data. If you have an invalid example in the specification, Prism will let you know; if your request is not compliant with the rules of your API specification, Prism will return an error message. It will never yell to you, we promise.
In case you’re wondering why Prism has responded to a request in such way, the logs show you the entire negotiation process, so you can modify the spec or your code quickly.