swagger.io (v2.0) hook for Sails. The application's models, controllers, and routes are aggregated and transformed into a Swagger Document. Supports the Swagger 2.0 specification.
$ npm install sails-swagger --save
// config/swagger.js
module.exports.swagger = {
/**
* require() the package.json file for your Sails app.
*/
pkg: require('../package'),
ui: {
url: 'http://swaggerui.balderdash.io'
}
};
After installing and configuring swagger, you can find the docs output on the /swagger/doc route.
MIT