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
- 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
- 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
## Installation
```bash
pip install mockapi
pip install -e .
```
## Usage
### Validate an OpenAPI spec
```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
mockapi start openapi.yaml --port 8080
```
### Show current configuration
```bash
# Show configuration
mockapi show-config
```
## Configuration
## Development
Create a `mockapi.yaml` file:
```bash
# Install dev dependencies
pip install -e ".[dev]"
```yaml
port: 8080
host: 0.0.0.0
delay: 100
seed: 42
# Run tests
pytest tests/ -v
# Build
python -m build
```
Or use environment variables:
- `MOCKAPI_PORT`
- `MOCKAPI_HOST`
- `MOCKAPI_SEED`
## License
MIT License