-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from CedricTheveneau/tests-doc
Added Jest / Supertest tests + Swagger API Doc
- Loading branch information
Showing
26 changed files
with
11,117 additions
and
1,457 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,23 @@ | ||
const swaggerJsDoc = require('swagger-jsdoc'); | ||
const swaggerUi = require('swagger-ui-express'); | ||
|
||
const swaggerOptions = { | ||
swaggerDefinition: { | ||
openapi: '3.0.0', | ||
info: { | ||
title: 'API Documentation', | ||
version: '1.0.0', | ||
description: 'Documentation for my API', | ||
}, | ||
servers: [ | ||
{ | ||
url: 'https://voyage-stoïque.com', | ||
}, | ||
], | ||
}, | ||
apis: ['./app/routes/*.js'] | ||
}; | ||
|
||
const swaggerDocs = swaggerJsDoc(swaggerOptions); | ||
|
||
module.exports = { swaggerUi, swaggerDocs }; |
Oops, something went wrong.