- BodyParser settings are now configurable
- Now you can define mock files for catching all methods once. You can just use names
ANY.json
or ANY.js
. (Thanks to @daanoz)
- Matching with nested wildcard improved. #25
- Verbose mode added. (Thanks to @iakovmarkov)
- Body Parser added as a internal dependency. So if you can read json body from request objects without any hassle.
- Custom middlewares will not cached anymore. So you don't need to restart your server when you changed your custom middlewares.
- XML Support added with the
type
config parameter
- Base url may be root path now.
- Checking for wildcard folders fail when no mocks folder exits
- speedLimit feature removed
- Setting multiple routes at once feature removed
baseUrl
can be set in outside of api mocker. For example, these are valid usage examples:
app.use('/api', apiMocker('target/path'));
// or
app.use('/api/v[1-9]{1,2}/', apiMoker({
target: 'target/path',
nextOnNotFound: true
}));
- Added support for lite-server and browser-sync
- Target path doesn't ignore leading slash
- Leading and trailing slashes on target path and requested paths are ignored
- JSON content-type response header added (#2 - thanks to @zaycker)
- Added ability to writing custom responses with JS files instead of JSON files.
- Added
nextOnNotFound
option
- Added support for setting multiple configurations at once