-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswagger.json
89 lines (89 loc) · 2.21 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
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Book donation",
"description": "Book donation API",
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
}
},
"host": "localhost:5000/",
"basePath": "api/",
"tags": [
{
"name": "Authendications",
"description": "API for user authendications"
}
],
"schemes": ["http"],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/auth/login": {
"post": {
"tags": ["Authendications"],
"summary": "User login",
"operationId": "userLogin",
"produces": ["application/json"],
"parameters": [
{
"name": "login",
"in": "body",
"description": "Login to get access token",
"required": true,
"schema": {
"$ref": "#/definitions/Login"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/LoginResponse"
}
}
}
}
}
},
"definitions": {
"Login": {
"type": "object",
"required": ["email", "password"],
"properties": {
"email": {
"type": "string",
"default": "[email protected]"
},
"password": {
"type": "string",
"default": "$ivakown7"
}
}
},
"LoginResponse": {
"type": "object",
"properties": {
"auth": {
"type": "boolean",
"default": "true"
},
"message": {
"type": "string",
"default": "Logged In"
},
"token": {
"type": "string",
"default": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxYTg2NWU2ZjcxZjcyMDgwZjcyNjc5MyIsImlhdCI6MTY0MTExNTMyOCwiZXhwIjoxNjQxMTI1MzI4fQ.InEbx6-hYU6J9PYZvEz4zjzmEzKlcPm9VJIgMhwl-pw"
},
"refreshToken": {
"type": "string",
"default": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxYTg2NWU2ZjcxZjcyMDgwZjcyNjc5MyIsImlhdCI6MTY0MTExNTMyOH0.6VWQbOGclUX4olWVTo-KxHF4gRUK_QxcoV0ZBuJLz5M"
}
}
}
}
}