forked from goitacademy/nodejs-homework-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswaggerConfig.js
42 lines (39 loc) · 1.28 KB
/
swaggerConfig.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
37
38
39
40
41
42
const swaggerJsdoc = require("swagger-jsdoc");
const options = {
swaggerDefinition: {
openapi: "3.0.1",
info: {
version: "1.0.3",
title: "Node.js - first REST API",
description:
"**API documentation**<p>This project utilizes the following technology stack:</p><ul><li><strong>Node.js:</strong> JavaScript runtime environment on the server.</li><li><strong>Express.js:</strong> Framework for developing web applications on Node.js.</li><li><strong>MongoDB:</strong> NoSQL database.</li><li><strong>Mongoose:</strong> Library for working with MongoDB у Node.js.</li></ul> ",
},
contact: {
name: "Anastasia",
url: "https://github.com/Anastasia-front/nodejs-phonebook-rest-api",
},
basePath: "/",
},
consumes: ["application/json", "multipart/form-data"],
produces: ["application/json"],
servers: [
{
url: "https://contacts-backend-eikd.onrender.com/",
description: "Production",
},
{ url: "http://localhost:3007", description: "Development" },
],
tags: [
{
name: "Auth",
description: "Authorization endpoints",
},
{
name: "Contacts",
description: "Contacts endpoints",
},
],
apis: ["./routes/api/*.js"],
};
const specs = swaggerJsdoc(options);
module.exports = specs;