-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
214 lines (214 loc) · 5.36 KB
/
openapi.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
openapi: 3.0.1
info:
description: API of EtuEDT-Back server.
version: 2.0.1
title: EtuEDT-Back
servers:
- url: https://edtapi.antoninhuaut.fr/v2
paths:
/:
get:
tags:
- timetable
summary: Get the list of universities
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/University'
/{numUniv}:
get:
tags:
- timetable
summary: Get a list of the university's timetables
parameters:
- name: numUniv
in: path
description: Id of university
required: true
schema:
type: integer
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Timetable'
'404':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/{numUniv}/{adeResources}:
get:
tags:
- timetable
summary: Get timetable details by numUniv and adeResources
parameters:
- name: numUniv
in: path
description: Id of university
required: true
schema:
type: integer
- name: adeResources
in: path
description: Id of timetable
required: true
schema:
type: integer
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/Timetable'
'404':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/{numUniv}/{adeResources}/{format}:
get:
tags:
- timetable
summary: Get timetable content by numUniv, adeResources and by format
parameters:
- name: numUniv
in: path
description: Id of university
required: true
schema:
type: integer
- name: adeResources
in: path
description: Id of timetable
required: true
schema:
type: integer
- name: format
in: path
description: Format to return
required: true
schema:
type: string
enum:
- ics
- json
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/JsonEvent'
text/calendar:
schema:
$ref: '#/components/schemas/IcalEvent'
'404':
description: Invalid parameters
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
University:
type: object
properties:
numUniv:
type: integer
example: 1
nameUniv:
type: string
example: Université de Caen
adeUniv:
type: string
example: http://ade.unicaen.fr
Timetable:
type: object
properties:
numUniv:
type: integer
example: 1
nameUniv:
type: string
example: Université de Caen
nameTT:
type: string
example: 1A TP 1.1
numYearTT:
type: integer
example: 1
descTT:
type: string
example: TP 1.1
adeResources:
type: integer
example: 1177
adeProjectId:
type: integer
example: 4
lastUpdate:
type: string
example: '2020-06-16T07:14:34.017Z'
Error:
type: object
properties:
error:
type: string
example: no cache found for this timetable
JsonEvent:
type: object
properties:
title:
type: string
example: Reunion de rentrée 1A
teacher:
type: string
example: M. Dupont
description:
type: string
example: BUT 1A
location:
type: string
example: Amphithéâtre
start:
type: string
example: '2023-09-05T09:00:00Z'
end:
type: string
example: '2023-09-05T10:00:00Z'
IcalEvent:
type: string
example: |
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:-//ADE/version 6.0
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20231208T153544Z
DTSTART:20230905T090000Z
DTEND:20230905T100000Z
SUMMARY:Reunion de rentrée 1A
LOCATION:Amphithéâtre
DESCRIPTION:\n\nBUT 1A\nM. Dupont\n(Exported :08/12/2023 16:35)\n
UID:ADE60323032332d323032342d3135343639352d302d30
CREATED:19700101T000000Z
LAST-MODIFIED:20231208T153544Z
SEQUENCE:-1960707552
END:VEVENT
END:VCALENDAR