Go to file
William Riley-Land 405ffc7545 v1.1.2 Allow Mongoose 4. 2015-05-07 21:07:18 -05:00
test v1.1.2 Allow Mongoose 4. 2015-05-07 21:07:18 -05:00
.gitignore Initial commit 2014-01-11 13:02:33 -08:00
Api.js baucis 1.0.0 compatibility. 2015-03-04 17:00:05 -06:00
Controller.js v1.1.1 Fix an issue when using Mixed type. 2015-03-11 19:08:57 -05:00
LICENSE Initial commit 2014-01-11 13:02:33 -08:00
README.md v1.1.1 Fix an issue when using Mixed type. 2015-03-11 19:08:57 -05:00
index.js baucis 1.0.0 compatibility. 2015-03-04 17:00:05 -06:00
package.json v1.1.2 Allow Mongoose 4. 2015-05-07 21:07:18 -05:00

README.md

baucis-swagger

This module generates customizable swagger definitions for your Baucis API. Use this module in conjunction with Baucis.

npm install --save baucis baucis-swagger

It is very easy to use. Include the package after baucis is included, and before your API is built.

var express = require('express');
var baucis = require('baucis');
var swagger = require('baucis-swagger');

var app = express();

// ... Set up a mongoose schema ...

baucis.rest('vegetable');
app.use('/api', baucis());

Then, access e.g. GET http://localhost:3333/api/documentation. See the Baucis repo for more information about building REST APIs with Baucis.

If you want to modify the swagger definition, generate the definition first. (This will happen automatically otherwise.)

controller.generateSwagger();
controller.swagger.xyz = '123';

Contact

© 2014-2015 William P. Riley-Land