下面是我正在使用express-oas-generator生成摇摇欲坠的文档的app.js文件:
var express = require('express');
var app = express();
const expressOasGenerator = require('express-oas-generator');
var bodyParser = require('body-parser');
var port = process.env.PORT || 3606;
var db = 'mongodb://localhost/example';
expressOasGenerator.init(app, {});
var books = require('./routes/books');
var express = require( 'express' );
mongoose.connect(db);
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: true}));
app.use('/books', books);
app.listen(port, function(){
console.log('app listening on port: '+port);
});
我有我的api的内部路由,在这里我可以得到如下所示的招摇页面,但是缺少关于投递,投递和修补程序的响应正文。 请告诉我如何解决我的问题?