generated from peter-evans/swagger-github-pages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
326 lines (326 loc) · 8.11 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
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
---
openapi: 3.0.3
info:
title: Timetabling for VIT
description: AI-powered timetabling solution for VIT
contact:
name: JetEdge Customer Support
email: [email protected]
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0-SNAPSHOT-oas3
servers:
- url: https://jetedge-backend-e1eeff4b0c04.herokuapp.com
description: Deployed Backend server
paths:
/login:
get:
summary: Authenticate login
description: Sends user-entered login details in the HTTP header and authenticates against the credentials stored in the database.
tags:
- User Resource
responses:
'200':
description: OK
content:
text/plain:
schema:
type: string
'401':
description: Not Authorized
'403':
description: Not Allowed
security:
- defaultApiKey: []
/rooms:
get:
summary: Get all rooms
description: Retrieves all rooms across all campuses.
tags:
- Room Resource
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Room'
'401':
description: Not Authorized
'403':
description: Not Allowed
security:
- defaultApiKey: []
post:
summary: Create a room
description: Sends a room in its correct Java class format.
tags:
- Room Resource
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Room'
responses:
'200':
description: OK
'401':
description: Not Authorized
'403':
description: Not Allowed
security:
- defaultApiKey: []
/timetabling:
get:
summary: Get all timetables
description: Retrives all generated timetables from the database, separated by campus.
tags:
- Timetable Resource
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Timetable'
'401':
description: Not Authorized
'403':
description: Not Allowed
security:
- defaultApiKey: []
post:
summary: Create a timetabling problem
description: Sends all information required to construct a timetabling problem.
tags:
- Timetable Resource
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Timetable'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Timetable'
'401':
description: Not Authorized
'403':
description: Not Allowed
security:
- defaultApiKey: []
/timetabling/example:
get:
summary: Get hard-coded timetable
description: Retrieves the solution to a hard-coded timetabling problem.
tags:
- Timetable Resource
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Timetable'
'401':
description: Not Authorized
'403':
description: Not Allowed
/timetabling/update:
put:
summary: Update a timetable
description: Updates the existing timetable of a campus with a series of drag-and-drop changes committed by the user relating to class time and location.
tags:
- Timetable Resource
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Unit'
responses:
'200':
description: OK
/units:
get:
summary: Get all units
description: Retrieves all units across all campuses.
tags:
- Unit Resource
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Unit'
'401':
description: Not Authorized
'403':
description: Not Allowed
post:
summary: Create a unit
description: Sends a unit in its correct Java class format.
tags:
- Unit Resource
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Unit'
responses:
'200':
description: OK
'401':
description: Not Authorized
'403':
description: Not Allowed
components:
securitySchemes:
defaultApiKey:
description: API key encoded
type: apiKey
name: Authorization
in: header
schemas:
DayOfWeek:
enum:
- MONDAY
- TUESDAY
- WEDNESDAY
- THURSDAY
- FRIDAY
- SATURDAY
- SUNDAY
type: string
Duration:
format: duration
type: string
example: P1D
HardSoftScore:
type: object
properties:
zero:
type: boolean
solutionInitialized:
type: boolean
initScore:
format: int32
type: integer
hardScore:
format: int32
type: integer
softScore:
format: int32
type: integer
feasible:
type: boolean
LocalTime:
format: local-time
type: string
externalDocs:
description: As defined by 'partial-time' in RFC3339
url: https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6
example: '13:45:30.123456789'
Room:
type: object
properties:
id:
format: int64
type: integer
roomCode:
type: string
buildingId:
type: string
campus:
type: string
capacity:
format: int32
type: integer
isLab:
type: boolean
lab:
type: boolean
Student:
type: object
properties:
id:
format: int64
type: integer
name:
type: string
Timetable:
type: object
properties:
id:
format: int64
type: integer
campusName:
type: string
daysOfWeek:
type: array
items:
$ref: '#/components/schemas/DayOfWeek'
startTimes:
type: array
items:
format: local-time
type: string
externalDocs:
description: As defined by 'partial-time' in RFC3339
url: https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6
example: '13:45:30.123456789'
rooms:
type: array
items:
$ref: '#/components/schemas/Room'
writeOnly: true
units:
type: array
items:
$ref: '#/components/schemas/Unit'
score:
$ref: '#/components/schemas/HardSoftScore'
Unit:
type: object
properties:
id:
format: int64
type: integer
unitId:
format: int32
type: integer
name:
type: string
course:
type: string
duration:
$ref: '#/components/schemas/Duration'
dayOfWeek:
$ref: '#/components/schemas/DayOfWeek'
startTime:
$ref: '#/components/schemas/LocalTime'
students:
type: array
items:
$ref: '#/components/schemas/Student'
studentSize:
format: int32
type: integer
room:
$ref: '#/components/schemas/Room'
wantsLab:
type: boolean
end:
$ref: '#/components/schemas/LocalTime'