- added support for async
outputFn
by returning a Promise
- removed dependency on lodash, use specific modules and native methods when possible #352
- fixed issue #294
- removed
compile
step, code now runs natively on Node 4+ andbabel
is only used for coverage
- fixed
distinct
queries whenoptions.totalCountHeader
is enabled
- improved sync error handling in
buildQuery
by wrapping in a promise - fixed crash when
distinct
andsort
operators were used in the same query
- improved default error middleware by serializing error objects and removing stack traces
- fixed Mongoose async middleware error propagation
- fixed requests to always set
req.erm.statusCode
- removed
statusCode
from error object and response body - removed undocumented
outputFn
parameter, usereq.erm.result
andreq.erm.statusCode
- added an option to disable regex operations (#195)
- fixed queries with an
idProperty
resulting in aCastError
to return404
instead of400
(#184) - fixed query parser to handle geospatial operators (#187)
- critical security fix with the
distinct
operator, see issue #252 for details
- ported source to ES2015, compiled and published as ES5 with Babel
- document filtering is now done right before output allowing access to the full document in post middleware
- removed
options.lowercase
andoptions.plural
, useoptions.name = require('inflection').pluralize('modelName').toLowerCase()
- changed
serve
to no longer returns an Express 4 router, now returns the resource's base path (ie.:/api/v1/Customer
) - changed
options.private
andoptions.protected
to no longer accept comma separated fields, pass an array instead - removed
options.excluded
, useoptions.private
- removed support for querying directly with query parameters, use
url?query={"name":"hello"}
- removed $and and $or query parameters, use
url?query={"$or":[...]}
- removed
prereq
, usepreMiddleware
instead - changed
postCreate
,postUpdate
, andpostDelete
signatures to(req, res, next)
- deprecated
outputFn
'sdata
parameter, data now available onreq.erm.result
andreq.erm.statusCode
This release requires mongoose ~4
- updated mongoose to version 4
- removed
fullErrors
, implement a customonError
handler instead - removed
strict
option, allows DELETE without id and POST with id, disallows PUT without id - async
prereq
andaccess
now use the standard(err, data)
callback signature access
will throw an exception when an unsupported value is passed- changed
outputFn
's signature to:(req, res, { result: result, statusCode: statusCode })
This release requires mongoose ~3