-
Notifications
You must be signed in to change notification settings - Fork 6
/
swagger.json
123 lines (123 loc) · 4.3 KB
/
swagger.json
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "digichlist API",
"description": "The digichlist - it's a Telegram Bot developed for IF-DC SS. This api is necessary for the work of the whole project, which includes not only the telegram of the bot, but also a web application for the administration. The purpose of API is to process operations performed using the bot's telegrams and the admin panel. Api stores, processes and retrieves information from the connected and configured MongoDB database.",
"license": {
"name": "Licensed Under MIT",
"url": "https://opensource.org/licenses/MIT"
}
},
"host": "localhost:5000",
"basePath": "/api/",
"schemes": ["https", "http"],
"tags": [
{
"name": "Authorization",
"description": "API to authorize administrators in the web application"
},
{
"name": "Admins",
"description": "API for operations with the entity of administrators in the web application"
},
{
"name": "Users",
"description": "API for registration and login of new users via telegram bot and operations with this entity on the side of the web application"
},
{
"name": "Defects",
"description": "API to create a new defect via telegram bot and view all defects by status and set date, as well as for operations on the side of the web application"
}
],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/admin/all": {
"get": {
"summary": "Get all admins in system",
"description": "",
"tags": ["Admins"],
"produces": ["application/json"],
"parameters": [],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"default": {},
"$ref": "#/definitions/adminGetAllResponse"
}
},
"401": {
"description": "Error: Unauthorized. Protected JWT Web Token"
},
"500": {
"description": "Error",
"schema": {
"default": {},
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"adminGetAllResponse": {
"required": ["response", "message"],
"properties": {
"response": {
"default": "ok",
"type": "string"
},
"message": {
"default": "Admins found",
"type": "string"
},
"admins": {
"type": "array",
"items": {
"$ref": "#/definitions/Admin"
}
}
}
},
"Admin": {
"required": ["email", "username", "password"],
"properties": {
"_id": {
"type": "integer",
"uniqueItems": true
},
"email": {
"default": "admin1admin@gmail.com",
"type": "string",
"uniqueItems": true
},
"username": {
"default": "admin1admin",
"type": "string",
"uniqueItems": true
},
"password": {
"default": "123456789Qwertyuiop",
"type": "string"
}
}
},
"Error": {
"required": ["success", "message"],
"properties": {
"success": {
"default": false,
"type": "boolean"
},
"message": {
"default": "Error message",
"type": "string"
}
}
}
}
}