-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathswagger.js
51 lines (50 loc) · 1.42 KB
/
swagger.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
43
44
45
46
47
48
49
50
51
const app = require('./package.json');
module.exports = {
openapi: "3.0.3",
info: {
version: `${app.version}`,
title: "Swagger UI for Chat app",
description: "This documentation for chat app application. Made by using nodejs, expressjs, typescript. For authorization, you have a token that can be obtained from the API login or after signup operation.",
termsOfService: "Soon...",
license: {
name: "MIT",
url: "https://openseource.org/licenses/MIT"
}
},
servers: [
{
url: `http://${process.env.HOST}:${process.env.PORT}/api`,
description: "Local server"
},
{
url: "Soon...",
description: "Testing server"
},
{
url: "Soon...",
description: "Production server"
}
],
tags: [
{
name: "Auth",
description: "User methods for interaction with user entity"
},
{
name: "Chat",
description: "Chat methods for interaction with chat entity"
}
],
"paths": require('./swagger/path'),
components: {
schemas: require('./swagger/components'),
securitySchemes: {
Bearer: {
type: "apiKey",
in: "header",
name: "authorization",
description: ""
}
}
}
}