-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
115 lines (115 loc) · 3.26 KB
/
swagger.yaml
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
definitions:
ProfileResponse:
description: ProfileResponse is the response model for the profile handler
x-go-package: auth-ms/handlers
SignupRequest:
x-go-package: auth-ms/handlers
Tokens:
x-go-package: auth-ms/data
User:
description: User represents the user schema for the database
x-go-package: auth-ms/data
info: {}
paths:
/:
get:
description: Returns a welcome message with status code 200
operationId: Home
responses:
"200":
$ref: '#/responses/HomeResponse'
tags:
- home
/login:
post:
description: Returns Tokens and uid if the credentials provided are correct
operationId: login
parameters:
- description: Request body containing email and password
in: body
name: Body
schema: {}
responses:
"200":
$ref: '#/responses/LoginResponse'
/profile:
get:
description: Returns the user's profile
operationId: Profile
responses:
"200":
description: ProfileResponse
schema:
$ref: '#/definitions/ProfileResponse'
tags:
- profile
/signup:
post:
description: Returns the user's profile
operationId: Signup
responses:
"200":
$ref: '#/responses/SignupResponse'
tags:
- signup
/token:
get:
description: Refreshes the access token using the refresh token
operationId: Token
responses:
"200":
$ref: '#/responses/TokenResponse'
tags:
- token
/verify:
get:
description: Verifies the validity of the access token
operationId: Verify
responses:
"200":
$ref: '#/responses/VerifyResponse'
tags:
- verify
responses:
HomeResponse:
description: HomeResponse is the response model for the home handler
headers:
msg:
type: string
status:
format: int64
type: integer
LoginResponse:
description: ""
headers:
data: {}
errors: {}
msg:
type: string
status:
type: boolean
SignupResponse:
description: ""
headers:
data: {}
errors: {}
msg:
type: string
status:
type: boolean
TokenResponse:
description: TokenResponse is the response model for the token endpoint
headers:
data: {}
msg:
type: string
status:
type: boolean
VerifyResponse:
description: VerifyResponse is the response model for the verify endpoint
headers:
msg:
type: string
status:
type: boolean
swagger: "2.0"