openapi-mock-express-middleware
Generates an express mock server from an Open API 3.0 documentation.
Installation
To begin, you'll need to install openapi-mock-express-middleware
:
$ npm install openapi-mock-express-middleware --save-dev
Usage
Simple Usage
const express = require('express');
const mockServer = require('openapi-mock-express-middleware');
const app = express();
app.use(
'/api' ,
mockServer({ file: '/absolute/path/to/your/openapi/spec.yml' })
);
app.listen(80, () => console.log('Server listening on port 80'))''
Contributing
Please take a moment to read our contributing guidelines if you haven't yet done so.
CONTRIBUTING
License
MIT