This project demonstrates a simple OpenAPI mock server with automated tests using Prism, Vitest, and a generated TypeScript client.
- Generate TypeScript client from OpenAPI specification
- Start a mock server to simulate API responses
- Run automated tests against the mock API
# Install dependencies
npm install
# Generate TypeScript client from OpenAPI spec
npm run generate
# Start Prism mock server
npm run mock
# Run automated tests
npm run test- The mock server runs at:
http://127.0.0.1:4010 - Tests are written using Vitest
- The generated client is located in
client/ - This is a lightweight POC for demonstration purposes; not production-ready