Convert backend to regular directory
This commit is contained in:
29
backend/src/docs/swagger.js
Normal file
29
backend/src/docs/swagger.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const swaggerJsdoc = require("swagger-jsdoc");
|
||||
|
||||
const options = {
|
||||
definition: {
|
||||
openapi: "3.0.0",
|
||||
info: {
|
||||
title: "Thé Tip Top API",
|
||||
version: "1.0.0",
|
||||
description: "API du jeu concours Thé Tip Top",
|
||||
},
|
||||
servers: [
|
||||
{
|
||||
url: "http://localhost:5000",
|
||||
},
|
||||
],
|
||||
components: {
|
||||
securitySchemes: {
|
||||
bearerAuth: {
|
||||
type: "http",
|
||||
scheme: "bearer",
|
||||
bearerFormat: "JWT",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
apis: ["./src/routes/*.js"],
|
||||
};
|
||||
|
||||
module.exports = swaggerJsdoc(options);
|
||||
Reference in New Issue
Block a user