Connexions¶
Connexions is a mock server generator for OpenAPI specifications.
It allows you to define multiple APIs and generate meaningful mock responses automatically.
You can also define static responses for any arbitrary path.
Goals¶
- provide a simple tool to work with API mocks
- combine multiple APIs into one server
- generate meaningful responses
Features¶
- Multiple APIs on one server - each spec becomes a service with its own URL prefix
- Upstream proxy with circuit breaker - forward to real backends with fallback to mocks
- Latency & error simulation - test how your app handles delays and failures
- Custom middleware - modify requests/responses on the fly
- Response caching - cache GET responses for consistency
- Request validation - validate against OpenAPI spec
Real-World Validation¶
Connexions continuously generates and validates data against 2,200+ real-world OpenAPI specifications from mockzilla/specs:
Total: 2215 services, 98464 endpoints
✅ Success: 98464 ❌ Fails: 0
Modes¶
Connexions runs in two modes:
- Portable - point at OpenAPI specs and run. No code generation, no setup.
- Codegen - generate typed Go handlers with custom logic and middleware.
Quick Start¶
Homebrew¶
brew tap mockzilla/tap
brew install connexions
connexions https://petstore3.swagger.io/api/v3/openapi.json
Go¶
go run github.com/mockzilla/connexions/v2/cmd/server@latest \
https://petstore3.swagger.io/api/v3/openapi.json
Templates¶
- Portable template - embed specs into a single binary via
go:embed - Codegen template - generate Go handlers with custom logic and middleware
Read full documentation at mockzilla.github.io/connexions.
License¶
Copyright (c) 2023-present
Licensed under the MIT License