Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.58 KB

README.md

File metadata and controls

40 lines (28 loc) · 1.58 KB

mongoose-to-swagger NPM version Build Status Dependency Status Coverage Status

Conversion library for transforming Mongoose schema objects into Swagger schema definitions.

Installation

$ npm install --save mongoose-to-swagger

Overview

Converts a mongoose model into a swagger schema.

Usage

const mongoose = require('mongoose');
const m2s = require('mongoose-to-swagger');
const Cat = mongoose.model('Cat', { name: String });
const swaggerSchema = m2s(Cat);
console.log(swaggerSchema);

Contributing

We look forward to seeing your contributions!

License

MIT © Ben Lugavere