OpenAPI Spec Validator & Mock Server
Validates OpenAPI 3.x specifications using the swagger-parser library and generates Prism mock servers. Detects schema inconsistencies, missing examples, and generates SDK client stubs via openapi-generator.
Installation
Use the upstream install or setup path that matches your environment:
- npm install -g @stoplight/prism-cli
Requirements and caveats from upstream:
- Prism requires
- Cannot access mock server when using Docker?
- Prism uses localhost by default, which usually means 127.0.0.1. When using docker the mock server will
Basic usage or getting-started notes:
Prism is an open-source HTTP server run from the command-line. It provides mocking, request validation, and content negotiation. Use it standalone tool or in continuous integration.
This information refers to Open Source Prism 3.x, which is the current version most likely you will use. If you're looking for the 2.x version, look at the [2.x branch][2.x]
NodeJS >= 18.20.1
Extracted from upstream docs: https://raw.githubusercontent.com/stoplightio/prism/HEAD/README.md