-
Notifications
You must be signed in to change notification settings - Fork 0
/
swaggerDefinition.yaml
232 lines (232 loc) · 5.84 KB
/
swaggerDefinition.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
swagger: "2.0"
info:
description: "This is the API definition for the team Goat Boat mentor pairing app. You can find out more about Goat Boat and our app at [http://github.com/crav12345/GoatBoat](http://github.com/crav12345/GoatBoat)."
version: "1.0.0"
title: "Goat Boat Mentor Connections"
termsOfService: "http://swagger.io/terms/"
contact:
email: "christopher.ravosa1@marist.edu"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "github.com"
basePath: "/crav12345/GoatBoat"
tags:
- name: "user"
description: "Everything a user can do with their account"
externalDocs:
description: "Find out more"
url: "http://github.com/crav12345/GoatBoat"
schemes:
- "https"
- "http"
paths:
/user:
post:
tags:
- "user"
summary: "Creates a user"
description: "This can only be done by the logged in user."
operationId: "createUser"
produces:
- "application/json"
parameters:
- name: "body"
in: "body"
description: "Created user object"
required: true
schema:
$ref: "#/definitions/User"
responses:
default:
description: "Successful operation"
/user/details:
post:
tags:
- "user"
summary: "Updates active user's account information"
description: ""
operationId: "updateUser"
produces:
- "application/json"
parameters:
- name: "body"
in: "body"
description: "Updated user object"
required: true
schema:
$ref: "#/definitions/User"
responses:
default:
description: "Successful operation"
/user/{username}:
get:
tags:
- "user"
summary: "Get user by username"
operationId: "getUser"
produces:
- "application/json"
parameters:
- name: "username"
in: "path"
description: "The username that needs to be fetched"
required: true
type: "string"
responses:
"200":
description: "Successful operation"
schema:
$ref: "#/definitions/User"
"400":
description: "Invalid username supplied"
/user/suggestions:
get:
tags:
- "user"
summary: "Get server generated suggested connections for this user"
operationId: "getSuggestions"
produces:
- "application/json"
responses:
"200":
description: "Successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/User"
"400":
description: ""
/user/login:
get:
tags:
- "user"
summary: "Logs user into the system"
description: ""
operationId: "loginUser"
produces:
- "application/json"
parameters:
- name: "username"
in: "query"
description: "The user name for login"
required: true
type: "string"
- name: "password"
in: "query"
description: "The password for login in clear text"
required: true
type: "string"
responses:
"200":
description: "successful operation"
schema:
type: "string"
headers:
X-Rate-Limit:
type: "integer"
format: "int32"
description: "calls per hour allowed by the user"
X-Expires-After:
type: "string"
format: "date-time"
description: "date in UTC when token expires"
"400":
description: "Invalid username/password supplied"
/user/logout:
get:
tags:
- "user"
summary: "Logs out current logged in user session"
description: ""
operationId: "logoutUser"
produces:
- "application/json"
responses:
default:
description: "Successful operation"
/{like|pass}/{username}:
post:
tags:
- "like/pass"
summary: "Adds to the list of users this user has asked to connect with or ignore"
description: ""
operationId: "likeOrPass"
produces:
- "application/json"
parameters:
- name: "like|pass"
in: "path"
description: "The boolean to determine whether the user wants to connect"
required: true
type: "boolean"
- name: "username"
in: "path"
description: "The user that is being liked or passed on"
required: true
type: "string"
responses:
default:
description: "Successful operation (need to add a match object to respond with)"
definitions:
User:
type: "object"
properties:
username:
type: "string"
firstName:
type: "string"
lastName:
type: "string"
email:
type: "string"
profession:
type: "string"
major:
type: "string"
lookingForMentor:
type: "array"
items:
type: "string"
lookingToMentor:
type: "array"
items:
type: "string"
mentors:
type: "array"
items:
type: "object"
properties:
username:
type: "string"
class:
type: "string"
students:
type: "array"
items:
type: "object"
properties:
username:
type: "string"
class:
type: "string"
schedule:
type: "array"
items:
type: "object"
properties:
day:
type: "array"
items:
$ref: "#/definitions/Course"
Course:
type: "object"
properties:
name:
type: "string"
day:
type: "string"
startTime:
type: "integer"
endTime:
type: "integer"