f8219f19c37b504095f08a9e186d01a825cfa6c3
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 filestart- Start a mock API server from an OpenAPI specificationgenerate- 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
Releases
1
v0.1.0 Initial Release
Latest
Languages
Python
100%