-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
69 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,4 +58,4 @@ module.exports = { | |
}, | ||
}), | ||
down: (queryInterface) => queryInterface.dropTable('Users'), | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import swaggerJSDoc from 'swagger-jsdoc'; | ||
|
||
|
||
// swagger definition | ||
const swaggerDefinition = { | ||
info: { | ||
title: 'Authors Haven Documentation', | ||
version: '1.0.0', | ||
description: | ||
'Endpoints for Authors Haven', | ||
}, | ||
host: 'localhost:3000', | ||
basePath: '/api', | ||
schemes: ['https', 'http'], | ||
securityDefinitions: { | ||
jwt: { | ||
type: 'apiKey', | ||
name: 'Authorization', | ||
in: 'header', | ||
}, | ||
}, | ||
security: [{ jwt: [] }], | ||
}; | ||
|
||
// initialize swagger-jsdoc | ||
const swaggerSpec = swaggerJSDoc({ | ||
swaggerDefinition, | ||
apis: ['./src/routes/*.js', './src/ models/*.js'], // pass all in array | ||
}); | ||
export default swaggerSpec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters