7000pctAUTO 730be92a3d
Some checks failed
CI / build (push) Has been cancelled
CI / test (push) Has been cancelled
Add mockapi source files and tests
2026-03-22 21:59:13 +00:00
2026-03-22 21:50:09 +00:00
2026-03-22 21:50:10 +00:00
2026-03-22 21:22:41 +00:00
2026-03-22 21:49:51 +00:00

MockAPI

OpenAPI Mock Server Generator - Generate functional mock APIs from OpenAPI 3.x specs

Features

  • Generate mock API servers from OpenAPI 3.x specifications
  • Realistic random data generation based on JSON schemas
  • Request validation against OpenAPI specs
  • Response delay simulation
  • Hot reload support for spec file changes
  • Configurable via YAML or environment variables

Installation

pip install mockapi

Usage

Validate an OpenAPI spec

mockapi validate openapi.yaml

Start a mock server

mockapi start openapi.yaml --port 8080

Show current configuration

mockapi show-config

Configuration

Create a mockapi.yaml file:

port: 8080
host: 0.0.0.0
delay: 100
seed: 42

Or use environment variables:

  • MOCKAPI_PORT
  • MOCKAPI_HOST
  • MOCKAPI_SEED

License

MIT License

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%