Prism is a command-line HTTP server that turns OpenAPI and Postman Collection specifications into mock servers with validation and contract testing capabilities.
Prism solves the problem of needing a working API before implementation is complete. It reads OpenAPI v2, OpenAPI v3.0, OpenAPI v3.1, or Postman Collection files and generates a mock server that responds with realistic data based on the specification. The tool operates in two primary modes: a mock server that generates responses from the specification, and a validation proxy that intercepts traffic to check whether actual API implementations match their documented contracts. Request validation and content negotiation are built into both modes.
Teams should adopt Prism when they need to parallelize API development and consumer work, test API contracts before backend implementation, or validate that live APIs conform to their specifications. It works well in continuous integration pipelines and for local development. The tool can run standalone from the command line or be integrated into testing workflows. Prism is available both as a self-hosted open-source tool and through hosted options provided by Stoplight, though the README does not compare the self-hosted version to other mock server generators.
Development on the project shows consistent engagement with community discussions and documented issues. The codebase is maintained in TypeScript and supports multiple Node.js versions with specific minimum requirements. The project maintains comprehensive documentation covering installation, mocking behavior, and proxy operation, alongside a dedicated getting-started guide.