UNPKG

express-oas-generator

Version:

Module to automatically generate OpenAPI (Swagger) specification for existing ExpressJS 4.x REST API applications

11 lines (7 loc) 267 B
const mongoose = require('mongoose'); const studentSchema = new mongoose.Schema({ id: { type: Number, required: true}, name: { type: String, required: true}, }); const studentModel = new mongoose.model('Student', studentSchema); module.exports = studentModel;