https://github.com/mockzilla/connexions
Generate APIs with meaningful responses, configurable latency, error codes and much more.
https://github.com/mockzilla/connexions
api api-first api-rest codegen generator golang microservices mocking openapi postman web-ui
Last synced: about 1 month ago
JSON representation
Generate APIs with meaningful responses, configurable latency, error codes and much more.
- Host: GitHub
- URL: https://github.com/mockzilla/connexions
- Owner: mockzilla
- License: mit
- Created: 2023-07-18T10:47:12.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2026-04-01T20:30:14.000Z (about 2 months ago)
- Last Synced: 2026-04-03T03:34:21.666Z (about 2 months ago)
- Topics: api, api-first, api-rest, codegen, generator, golang, microservices, mocking, openapi, postman, web-ui
- Language: Go
- Homepage: https://mockzilla.github.io/connexions/
- Size: 5.91 MB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
## Connexions
[](https://github.com/mockzilla/connexions/actions/workflows/ci.yml?query=branch%3Amaster)
[](https://github.com/mockzilla/connexions/actions/workflows/ci.yml?query=event%3Apush+branch%3Amaster+workflow%3ACI)
[](https://codecov.io/gh/mockzilla/connexions)
[](https://goreportcard.com/report/github.com/mockzilla/connexions)
[](https://godoc.org/github.com/mockzilla/connexions)
[](https://pkg.go.dev/github.com/mockzilla/connexions)
[](https://github.com/mockzilla/connexions/blob/master/LICENSE)
**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** - 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](https://github.com/mockzilla/specs):
```
Total: 2215 services, 98464 endpoints
✅ Success: 98464 ❌ Fails: 0
```
## Modes
Connexions runs in two modes:
- **[Portable](https://mockzilla.github.io/connexions/usage/portable/)** - point at OpenAPI specs and run. No code generation, no setup.
- **[Codegen](https://mockzilla.github.io/connexions/usage/codegen/)** - generate typed Go handlers with custom logic and middleware.
## Quick Start
### Homebrew
```bash
brew tap mockzilla/tap
brew install connexions
connexions https://petstore3.swagger.io/api/v3/openapi.json
```
### Go
```bash
go run github.com/mockzilla/connexions/v2/cmd/server@latest \
https://petstore3.swagger.io/api/v3/openapi.json
```
### Templates
- [Portable template](https://github.com/mockzilla/connexions-portable-template) - embed specs into a single binary via `go:embed`
- [Codegen template](https://github.com/mockzilla/connexions-codegen-template) - generate Go handlers with custom logic and middleware
Read full documentation at [mockzilla.github.io/connexions](https://mockzilla.github.io/connexions/).
[OpenAPI Specification](https://editor.swagger.io/?url=https://raw.githubusercontent.com/mockzilla/connexions/master/resources/openapi.yml)
License
===================
Copyright (c) 2023-present
Licensed under the [MIT License](https://github.com/mockzilla/connexions/blob/master/LICENSE)