-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.js
More file actions
36 lines (30 loc) · 758 Bytes
/
swagger.js
File metadata and controls
36 lines (30 loc) · 758 Bytes
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 router = require('express').Router()
const swagger = require('express-swagger-generator')
const {version} = require('./package.json')
const options = {
swaggerDefinition: {
info: {
title: 'ArtsyApp API Documentation', // Title (required)
version: version, // Version (required)
description: 'API Documentation for CS4518 Group 3 final project.',
license: {
name: 'MIT',
},
host: '',
basePath: '/'
},
schemes: ['http', 'https'],
securityDefinitions: {
cookieAuth: {
type: 'apiKey',
in: 'cookie',
name: 'connect.sid',
description: 'Express session cookie',
}
}
},
files: ['./routes/**/*.js', './models/**/*.js'],
basedir: process.cwd()
}
swagger(router)(options)
module.exports = router