No description or website provided.
Clone or download
Latest commit 97c69d6 May 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
lib
test
.editorconfig
.eslintrc.js
.gitattributes
.gitignore fix build May 29, 2018
.travis.yml
LICENSE initial commit Apr 4, 2017
README.md
package-lock.json update packages May 29, 2018
package.json

README.md

NPM version Build StatusDependency Status Coverage Status

mongoose-to-swagger

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