diff --git a/README.md b/README.md index 2519f21..0cdc8c9 100644 --- a/README.md +++ b/README.md @@ -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 \ No newline at end of file