-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
431 lines (408 loc) · 11.1 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
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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
openapi: 3.0.3
info:
title: Vereinsflieger REST API
version: '466.98009'
externalDocs:
description: Official API documentation
url: https://www.vereinsflieger.de/member/help/download.php?file=VereinsfliegerRestInterface.pdf
servers:
- url: https://www.vereinsflieger.de/interface/rest
tags:
- name: auth
description: Request used for authentication against Vereinsflieger.de API
- name: members
description: Request about members. These requests require the right "Mitgliederdaten bearbeiten"
paths:
/auth/accesstoken:
get:
tags:
- auth
operationId: GetAccesstoken
description: Returns an accesstoken
security: []
responses:
200:
$ref: '#/components/responses/AccessTokenResponse'
/auth/signin:
post:
tags:
- auth
operationId: Signin
description: Login with access token
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SignInCredentialsDto'
responses:
200:
$ref: '#/components/responses/OkResponse'
403:
$ref: '#/components/responses/LoginFailedResponse'
/auth/signout:
delete:
tags:
- auth
operationId: Signout
description: Logout with accesstoken
responses:
200:
$ref: '#/components/responses/OkResponse'
401:
$ref: '#/components/responses/UnauthorizedResponse'
/auth/getuser:
post:
tags:
- auth
operationId: GetUser
description: Get details of the current user
responses:
200:
$ref: '#/components/responses/UserResponse'
401:
$ref: '#/components/responses/UnauthorizedResponse'
/user/list:
post:
tags:
- members
operationId: GetMembers
description: Get a list of all members
responses:
200:
$ref: '#/components/responses/UsersResponse'
400:
$ref: '#/components/responses/BadRequestResponse'
401:
$ref: '#/components/responses/UnauthorizedResponse'
components:
schemas:
VereinsfliegerResponseDto:
type: object
properties:
httpstatuscode:
type: integer
description: HTTP status code
example: 200
VereinsfliegerErrorDto:
allOf:
- $ref: '#/components/schemas/VereinsfliegerResponseDto'
- type: object
properties:
error:
type: string
description: The error message if an error occured
VereinsfliegerExtendedErrorDto:
allOf:
- $ref: '#/components/schemas/VereinsfliegerErrorDto'
- type: object
properties:
url:
type: string
example: /interface/rest/auth/getuser
accesstoken:
type: string
example: 86bfb5c7072caf127c49d5c7b13c5b3740c6dcf39cba44dc479f738e3b347324
PHPSESSID:
type: string
example: bfe7f1d8d48324db82247849971334c6
urlpath:
type: string
example: /interface/rest/auth/
urlfile:
type: string
example: getuser
passphrase:
type: string
example: 16c6bce39cbb44dc478f738e3b347324
AccessTokenDto:
type: object
properties:
accesstoken:
type: string
example: 86bfb5c7072caf127c49d5c7b13c5b3740c6dcf39cba44dc479f738e3b347324
URL:
type: string
description: The IP address of the server requested the access token
example: 91.16.191.254
SignInCredentialsDto:
type: object
required:
- appkey
- username
- password
properties:
appkey:
type: string
description: Aplication secret. To obtain one, contact the support of Vereinsflieger.de
username:
type: string
password:
type: string
description: The md5 hashed password of the user
cid:
type: integer
description: The club id. Only required if the user is member of multiple clubs
auth_secret:
type: string
description: The current OTP if 2FA is enabled for the user's account
LoginFailedDto:
type: object
properties:
need_2fa:
type: integer
description: Indicates weather the login needs 2FA
example: 1
UserDto:
type: object
properties:
uid:
type: integer
example: 98009
memberid:
type: string
description: Member number
example: 39
firstname:
type: string
example: Max
lastname:
type: string
example: Mustermann
email:
type: string
format: email
example: max@mustermann.de
status:
type: string
description: Membership status
example: aktiv
roles:
type: array
description: Assigned roles
items:
type: string
example: Mitglied
ExtendedUserDto:
type: object
properties:
uid:
type: integer
example: 98009
title:
type: string
example: Dr.
firstname:
type: string
example: Max
lastname:
type: string
example: Mustermann
careof:
type: string
description: Adresszusatz
street:
type: string
example: Musterstraße 123
zipcode:
type: string
example: 12345
town:
type: string
example: Musterhausen
email:
type: string
format: email
example: max@mustermann.de
gender:
type: string
enum:
- m
- w
birthday:
type: string
example: 05.02.1974
birthplace:
type: string
example: Musterhausen
homenumber:
type: string
description: private
example: 030 123456789
mobilenumber:
type: string
description: private mobile
example: 0123 456789
phonenumber:
type: string
description: business
example: 030 123456789
phnenumber2:
type: string
description: business mobile
example: 0123 456789
carlicenseplate:
type: string
example: B VF 123
identification:
type: string
description: ID card number
natoid:
type: string
description: NatoID
policecert_validto:
type: string
description: Führungszeugnis
example: 06.02.2021
ice_contact1:
type: string
description: Emergency contact 1
ice_contact2:
type: string
description: Emergency contact 2
memberid:
type: string
description: Member number
example: 39
memberbegin:
type: string
description: Eintrittsdatum
example: 01.05.2020
memberend:
type: string
description: Austrittsdatum
example: 31.12.2020
lettertitle:
type: string
description: Briefanrede
example: Herr Mustermann
memberstatus:
type: string
description: Membership status
example: aktiv
country:
type: string
example: Deutschland
bankaccountname:
type: string
description: Mitgliedsstatus
example: Max Mustermann
directdebitauth:
type: integer
description: Lastschrift
example: 1
iban:
type: string
example: DE10123456780123456789
bic:
type: string
example: ABCDDEXXXX1X
mandate:
type: string
description: Mandate id
example: OurClub0039
mandatedate:
type: string
example: 10.01.2020
mailrecipient:
type: integer
description: Rundmailempfänger
example: 1
roles:
type: array
description: Assigned roles
items:
type: string
example: Mitglied
sector:
type: array
description: Zugeordnete Sparten
items:
type: string
example: Segelflug
functions:
type: array
items:
type: string
example: 1. Vorsitzender
educations:
type: array
description: Nicht beendete Lehrpläne
items:
type: string
responses:
OkResponse:
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/VereinsfliegerResponseDto'
BadRequestResponse:
description: Bad request
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VereinsfliegerExtendedErrorDto'
- properties:
httpstatuscode:
example: 400
error:
example: Bad request
UnauthorizedResponse:
description: Unauthorized
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VereinsfliegerExtendedErrorDto'
- properties:
httpstatuscode:
example: 401
error:
example: Unauthorized
AccessTokenResponse:
description: Access token response
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VereinsfliegerResponseDto'
- $ref: '#/components/schemas/AccessTokenDto'
LoginFailedResponse:
description: Login failed
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VereinsfliegerErrorDto'
- $ref: '#/components/schemas/LoginFailedDto'
- properties:
httpstatuscode:
example: 403
error:
example: Wrong User or wrong Password
UserResponse:
description: One user
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VereinsfliegerResponseDto'
- $ref: '#/components/schemas/UserDto'
UsersResponse:
description: List of users
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/VereinsfliegerResponseDto'
- type: array
items:
$ref: '#/components/schemas/ExtendedUserDto'
securitySchemes:
access_token:
type: apiKey
name: accesstoken
in: query
security:
- access_token: []