7000pctAUTO 6032d2d44c
Some checks failed
CI / test (push) Has been cancelled
CI / build (push) Has been cancelled
Add all source files for CI to work
2026-03-22 21:22:45 +00:00
2026-03-22 21:22:42 +00:00
2026-03-22 21:22:41 +00:00
2026-03-22 21:22:40 +00:00

MockAPI - OpenAPI Mock Server Generator

A CLI tool that generates a fully functional mock API server from OpenAPI 3.x specifications.

Features

  • Generate mock server from OpenAPI 3.x specs
  • Configurable response delays and error simulation
  • Random realistic test data generation from schemas
  • Request validation against OpenAPI spec
  • Hot-reload on spec changes
  • Built-in random data generators for common types

Installation

pip install -e .[dev]

Quick Start

# Validate an OpenAPI spec
mockapi validate openapi.yaml

# Start a mock server
mockapi start openapi.yaml

# Show configuration
mockapi show-config

CLI Commands

  • validate - Validate an OpenAPI specification file
  • start - Start a mock API server from an OpenAPI specification
  • generate - Generate code/structure from an OpenAPI spec (dry-run mode)
  • show-config - Show the current configuration

Configuration

Create a mockapi.yaml file:

port: 8080
host: 0.0.0.0
delay: 100
random_delay: false
seed: 42
validate_requests: true

License

MIT

Description
OpenAPI Mock Server Generator - Generate functional mock APIs from OpenAPI 3.x specs
Readme MIT 214 KiB
2026-03-22 21:06:44 +00:00
Languages
Python 100%