UNPKG

1.59 kBMarkdownView Raw
1## Release Notes
2
3### swagger-node 0.7.0, swagger-node-runner 0.5.0
4
5#### New features
6
7 * Request handing pipeline is now fully configurable
8 * Application configuration is now driven by the [config module](https://github.com/lorenwest/node-config/wiki/Configuration-Files) to allow a ton of flexibility in setting up configurations and routes based on environment.
9 * Supports plugins such as [volos-swagger-oauth](https://www.npmjs.com/package/volos-swagger-oauth) and [volos-swagger-apply](https://www.npmjs.com/package/volos-swagger-apply)
10 * Custom security handlers can be declared in config in app.js. Example:
11
12 ```javascript
13 config.swaggerSecurityHandlers = {
14 oauth2: function securityHandler1(req, authOrSecDef, scopesOrApiKey, cb) {
15 // your security code
16 cb();
17 }
18 };
19 ```
20
21#### Bug Fixes
22
23 * json_error_handler should work in all container environments (mapErrorsToJson did not)
24
25#### Breaking Changes
26
27 * `mapErrorsToJson` config option is now configured as an onError handler: `onError: json_error_handler`
28 * `docEndpoints` raw config option is now declared in Swagger and handled via a pipe: `swagger_raw`
29
30#### Converting From Previous Version
31
32 1. Update your package.json to use the new middleware versions: "^0.1.0". (eg. `"swagger-express-mw": "^0.1.0"`)
33 2. Update your application dependencies: `npm update`.
34 3. Existing config should generally work, but you should update your config to the [new format](https://github.com/swagger-api/swagger-node/blob/master/docs/cli.md/configuration.md).
35
\No newline at end of file