- Request handing pipeline is now fully configurable
- Application configuration is now driven by the config module to allow a ton of flexibility in setting up configurations and routes based on environment.
- Supports plugins such as volos-swagger-oauth and volos-swagger-apply
- Custom security handlers can be declared in config in app.js. Example:
config.swaggerSecurityHandlers = {
oauth2: function securityHandler1(req, authOrSecDef, scopesOrApiKey, cb) {
// your security code
cb();
}
};
- json_error_handler should work in all container environments (mapErrorsToJson did not)
mapErrorsToJson
config option is now configured as an onError handler:onError: json_error_handler
docEndpoints
raw config option is now declared in Swagger and handled via a pipe:swagger_raw
- Update your package.json to use the new middleware versions: "^0.1.0". (eg.
"swagger-express-mw": "^0.1.0"
) - Update your application dependencies:
npm update
. - Existing config should generally work, but you should update your config to the new format.