-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.js
36 lines (36 loc) · 856 Bytes
/
swagger.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const User = require("./models/users");
const m2s = require('mongoose-to-swagger');
const options = {
definition: {
openapi: "3.1.0",
components:{
schemas: {
user: m2s(User)
}
},
info: {
title: "Weather Web Application APIs",
version: "0.1.0",
description:
"This is a documentation for the weather web application",
license: {
name: "MIT",
url: "https://spdx.org/licenses/MIT.html",
},
contact: {
name: "Namycodes",
url: "https://namycodes.vercel.app",
email: "[email protected]",
},
},
servers: [
{
url: "http://localhost:8080",
},
],
},
apis: ["./routes/users/*.js","./routes/weather/*.js"],
};
module.exports = {
options
}