Conversion library for transforming Mongoose schema objects into Swagger schema definitions.
$ npm install --save mongoose-to-swagger
Converts a mongoose model into a swagger schema.
const mongoose = require('mongoose');
const m2s = require('mongoose-to-swagger');
const Cat = mongoose.model('Cat', { name: String });
const swaggerSchema = m2s(Cat);
console.log(swaggerSchema);
We look forward to seeing your contributions!
MIT © Ben Lugavere