# stoplightio/prism

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/stoplightio-prism).**

4,965 stars · 408 forks · TypeScript · Apache-2.0

## Links

- GitHub: https://github.com/stoplightio/prism
- Homepage: https://stoplight.io/open-source/prism
- awesome-repositories: https://awesome-repositories.com/repository/stoplightio-prism.md

## Description

Prism is a set of tools for generating mock servers and validation proxies based on OpenAPI specifications or Postman collection files. It serves as an API contract testing tool to verify that API implementations adhere to formal contracts.

The project provides an OpenAPI mock server that simulates API responses and a validation proxy that checks live HTTP traffic against an OpenAPI specification to identify implementation discrepancies. It also includes a mock server capable of mimicking API behavior based on exported Postman Collection files.

The tool covers API behavior simulation and traffic validation through schema-driven mock generation and specification-based request validation. It utilizes transparent proxy interception to forward traffic to a backend while simultaneously validating requests and responses against an API definition.

## Tags

### Data & Databases

- [API Contract Validation](https://awesome-repositories.com/f/data-databases/json-schema-modeling/schema-validators/api-contract-validation.md) — Verifies that a live API server's behavior and responses strictly adhere to its defined OpenAPI contract.

### Part of an Awesome List

- [Contract Testing](https://awesome-repositories.com/f/awesome-lists/devtools/contract-testing.md) — Verifies API compatibility between consumers and providers using a shared specification and proxy server.
- [API Debugging and Mocking](https://awesome-repositories.com/f/awesome-lists/devtools/api-debugging-and-mocking.md) — A tool for API mocking and contract testing.
- [Mocking Tools](https://awesome-repositories.com/f/awesome-lists/devtools/mocking-tools.md) — HTTP mock server for early API validation.

### Networking & Communication

- [API Response Simulators](https://awesome-repositories.com/f/networking-communication/network-traffic-processors/api-response-simulators.md) — Provides a mock server that simulates API responses based on OpenAPI documents for development. ([source](https://cdn.jsdelivr.net/gh/stoplightio/prism@main/README.md))
- [Transparent API Proxies](https://awesome-repositories.com/f/networking-communication/transparent-api-proxies.md) — Intercepts and forwards traffic to a backend while simultaneously validating it against the API definition.

### Software Engineering & Architecture

- [Validation Proxies](https://awesome-repositories.com/f/software-engineering-architecture/json-schema-validation/validation-proxies.md) — Acts as a proxy service that enforces schema validation on both request and response payloads.
- [Runtime Specification Validation](https://awesome-repositories.com/f/software-engineering-architecture/openapi-specification-management/runtime-specification-validation.md) — Checks live API traffic against OpenAPI definitions to identify implementation bugs or undocumented changes.
- [Mock Server Generators](https://awesome-repositories.com/f/software-engineering-architecture/openapi-specification-parsers/mock-server-generators.md) — Converts OpenAPI specifications into an executable mock server to simulate API responses.
- [Request Validation](https://awesome-repositories.com/f/software-engineering-architecture/request-validation.md) — Validates incoming HTTP requests against a formal schema to identify missing parameters or type mismatches.
- [API Interface Prototyping](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/rapid-prototyping/api-interface-prototyping.md) — Enables rapid modeling of HTTP endpoints and data structures to validate technical interfaces.
- [OpenAPI Specification Parsers](https://awesome-repositories.com/f/software-engineering-architecture/openapi-specification-parsers.md) — Parses OpenAPI and Swagger definitions into internal models used for routing and validation logic.

### Testing & Quality Assurance

- [API Traffic Auditors](https://awesome-repositories.com/f/testing-quality-assurance/api-traffic-auditors.md) — Proxies HTTP traffic to verify requests and responses against a defined type system and specification. ([source](https://cdn.jsdelivr.net/gh/stoplightio/prism@main/README.md))
- [Schema-Driven Mocking](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/dependency-mocking/automated-mock-generation/schema-driven-mocking.md) — Generates synthetic API responses by mapping request paths to examples defined in the specification.
- [Postman Collection Mocking](https://awesome-repositories.com/f/testing-quality-assurance/http-mock-servers/cloud-service-mock-servers/postman-collection-mocking.md) — Mimics API behavior based on exported Postman Collection files to provide a local mock server.

### Web Development

- [API Mocking Servers](https://awesome-repositories.com/f/web-development/api-mocking-servers.md) — Creates local services that simulate backend responses to decouple frontend and backend development.
- [API Response Transformations](https://awesome-repositories.com/f/web-development/api-response-transformations.md) — Alters mock response content on the fly to simulate different API states or error conditions.
