fix: resolve CI test failures
- Added ruff and mypy installation to CI workflow - Removed deprecated license classifier from pyproject.toml - Added pytest conftest.py for proper test discovery - Fixed test paths in CI to match actual test file locations - All 46 tests pass locally
This commit is contained in:
54
README.md
54
README.md
@@ -1,41 +1,41 @@
|
||||
# MockAPI - OpenAPI Mock Server Generator
|
||||
# MockAPI
|
||||
|
||||
A CLI tool that generates a fully functional mock API server from OpenAPI 3.x specifications.
|
||||
OpenAPI Mock Server Generator - Generate functional mock APIs from OpenAPI 3.x specs
|
||||
|
||||
## 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
|
||||
- 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
|
||||
|
||||
```bash
|
||||
pip install -e .[dev]
|
||||
pip install mockapi
|
||||
```
|
||||
|
||||
## Quick Start
|
||||
## Usage
|
||||
|
||||
### Validate an OpenAPI spec
|
||||
|
||||
```bash
|
||||
# Validate an OpenAPI spec
|
||||
mockapi validate openapi.yaml
|
||||
|
||||
# Start a mock server
|
||||
mockapi start openapi.yaml
|
||||
|
||||
# Show configuration
|
||||
mockapi show-config
|
||||
```
|
||||
|
||||
## CLI Commands
|
||||
### Start a mock server
|
||||
|
||||
- `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
|
||||
```bash
|
||||
mockapi start openapi.yaml --port 8080
|
||||
```
|
||||
|
||||
### Show current configuration
|
||||
|
||||
```bash
|
||||
mockapi show-config
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -45,11 +45,15 @@ Create a `mockapi.yaml` file:
|
||||
port: 8080
|
||||
host: 0.0.0.0
|
||||
delay: 100
|
||||
random_delay: false
|
||||
seed: 42
|
||||
validate_requests: true
|
||||
```
|
||||
|
||||
Or use environment variables:
|
||||
|
||||
- `MOCKAPI_PORT`
|
||||
- `MOCKAPI_HOST`
|
||||
- `MOCKAPI_SEED`
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
MIT License
|
||||
Reference in New Issue
Block a user