- Dropped support for Node.JS < 6
- Update dependencies
- Changed: major update run-it@v3
- Changed: add support for object with extra properties in
error()
functions
- Removed support for formats in
error()
functions
- Fixed: bug when handling invalid URL,
next()
andres.json()
were called for the same request
- Added:
timeout
andontimeout
options to allow to monitor endpoints that take too long to finish. - Changed:
body
passed toonsuccess
,onfailure
andontimeout
are now a snapshot on the initial body. In previous versions, is the endpoint handler (on any filter) modified the body, the changes would overwrite the information provided to those callbacks.
- Added: support for setting body limit by endpoint using
module.exports.bodyLimit
- Added: support for OpenAPI (Swagger) spec, with
API#getOpenAPISpec()
- Added: optional (disabled by default) route to serve swagger.json file for each version and for all versions
- Changed: updated [email protected]
- Added: option
bodyParser
passed to bodyParser.json()
- Changed: updated [email protected]
- Added: option
callToJSON
to let one change how the body scrubbing logic call toJSON on objects. The default implementation is simplyx => x.toJSON()
.
- Changed: updated dependencies
- Added: support for custom plugins (option
plugins
)
- Changed: [email protected]
- Removed:
onerror
option
- Added: support for custom plugins
onsuccess
andonfailure
now receiverunInfo
instead ofreq
as second parameter. To access the express request, userunInfo.req
.onsuccess
andonfailure
now receiveendpoint
instead ofaction
as forth parameter. To access the action, useendpoint.action
.- Removed
body._req
. To access the request, useprocess.domain.runInfo.req
.
- Dev mode removed (
lastVersionIsDev
flag), since it was too awkward to work with it. If a version is considered in development, it should be noted in the provider docs. apiLift()
now returns anAPI
instance, instead of an express router. To access the router, useapi.router
v-last
is not explicity listed in theendpoints
array anymore- renamed
apiLift.Error
toapiLift.APIError
- Added: generated docs
API#run()
method to call endpoints directly
- Added:
req.requestId
, a string unique for each request - Added: made the express request object available as global, in
process.domain.runInfo
- Added:
dataScrub
option, to give control over which fields should be scrubbed in the body - Changed: instead of removing sensitive fields, change them to
'[HIDDEN]'
- Changed: [email protected]
- Changed: using [email protected]
- Fixed: default value for options.validateOutput.exportName
- Added: output checking