Add README.md
Some checks failed
CI / test (push) Failing after 14s
CI / build (push) Has been skipped
CI / lint (push) Successful in 13s

This commit is contained in:
2026-03-22 22:00:48 +00:00
parent d7a1a473d9
commit 058830344d

View File

@@ -1,59 +1,43 @@
# MockAPI # MockAPI - OpenAPI Mock Server Generator
OpenAPI Mock Server Generator - Generate functional mock APIs from OpenAPI 3.x specs A CLI tool that generates a fully functional mock API server from OpenAPI 3.x specifications.
## Features ## Features
- Generate mock API servers from OpenAPI 3.x specifications - Generate mock server from OpenAPI 3.x specs
- Realistic random data generation based on JSON schemas - Configurable response delays and error simulation
- Request validation against OpenAPI specs - Random realistic test data generation from schemas
- Response delay simulation - Request validation against OpenAPI spec
- Hot reload support for spec file changes - Hot-reload on spec changes
- Configurable via YAML or environment variables
## Installation ## Installation
```bash ```bash
pip install mockapi pip install -e .
``` ```
## Usage ## Usage
### Validate an OpenAPI spec
```bash ```bash
mockapi validate openapi.yaml # Validate an OpenAPI spec
``` mockapi validate spec.yaml
### Start a mock server # Start a mock server
mockapi start spec.yaml
```bash # Show configuration
mockapi start openapi.yaml --port 8080
```
### Show current configuration
```bash
mockapi show-config mockapi show-config
``` ```
## Configuration ## Development
Create a `mockapi.yaml` file: ```bash
# Install dev dependencies
pip install -e ".[dev]"
```yaml # Run tests
port: 8080 pytest tests/ -v
host: 0.0.0.0
delay: 100 # Build
seed: 42 python -m build
``` ```
Or use environment variables:
- `MOCKAPI_PORT`
- `MOCKAPI_HOST`
- `MOCKAPI_SEED`
## License
MIT License