This repository was archived by the owner on Sep 13, 2023. It is now read-only.
Releases: Banno/node-mock-rest-middleware
Releases · Banno/node-mock-rest-middleware
Release list
v2.3.1
v2.3.0
v2.2.2
v2.2.1
v2.2.0
v2.1.0
Added /_reset endpoint (see documentation).
v2.0.0
New Features
- A custom
Content-Typeheader can now be set in the responses. - Added some logging (toggled with
logger.enable()andlogger.disable()). - Added
collectionKey,countKey,limitParam,offsetParam, andqueryParamoptions. - Added support for overriding the MiddlewareRule handlers entirely (using the
handlercallback). - Added query parameters for sorting collection results.
- Requests can now use a form body (
application/x-www-form-urlencoded). - Added support for
PUT /example. - Added support for
DELETE /example.
Breaking Changes
- The original query parameters are now passed to the
postfiltercallbacks, rather than theprefilter-ed parameters. Middleware.prototype.addResource()now returns the new rule, rather than the middleware instance.- Default (fallthrough) middleware now logs a message and continues to the next middleware, rather than returning a 404 response.
- The
prefilterandpostfiltercallbacks can't be passed in a constructor option anymore; they can be changed after the rule is created.
Bug Fixes
- Added missing prefilter call to
MiddlewareRule.prototype.replaceItem().