connexions

module
v2.1.93 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: MIT

README

Connexions

CI Endpoint Badge codecov GoReportCard GoDoc Go Reference 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:

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

Read full documentation at mockzilla.github.io/connexions.

OpenAPI Specification

License

Copyright (c) 2023-present

Licensed under the MIT License

Directories

Path Synopsis
cmd
api
fake_list command
gen/discover command
gen/fakes command
gen/service command
gen/simplify command
server command
internal
pkg
api
db
Package db provides a shared storage abstraction with support for multiple backends (memory, redis) and per-service isolated views.
Package db provides a shared storage abstraction with support for multiple backends (memory, redis) and per-service isolated views.
middleware
Package middleware provides HTTP middleware for connexions services.
Package middleware provides HTTP middleware for connexions services.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL