-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrest-template.yaml
570 lines (568 loc) · 18.1 KB
/
rest-template.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
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
# Swagger API spec in YAML
# Movement calculator
swagger: "2.0"
info:
title: movement calculator
description: Movement calc
version: "1.0.5"
# array of all schemes that your API supports
schemes:
- https
basePath: "/wp-json/um-configurator/v1"
paths:
/options/{key}:
get:
description: Gibt einen wert zum Schlüssel zurück
parameters:
- name: key
in: path
description: key
required: true
type: string
responses:
"200":
description: Wert
schema:
type: object
items:
$ref: "#/definitions/Option"
put:
description: Legt einen neuen Wert an
parameters:
- name: key
in: path
description: key
required: true
type: string
- in: body
name: value
description: Wert zum Schlüssel {key}
required: true
schema:
type: object
items:
$ref: "#/definitions/Option"
responses:
"204":
description: OK
/order/last/{number}:
get:
description: Gibt {number} letzte Aufträge zurück, sort by creationDate
parameters:
- name: number
in: path
description: Anzahl der letzten Aufträge.
required: true
type: number
responses:
"200":
description: Aufträge
schema:
type: array
items:
$ref: "#/definitions/Order"
/order:
get:
summary: Auftragsdaten by query
description: Gibt Aufträge zurück, welche die query Kriterien erfüllen
parameters:
- name: queryCriteria
in: query
description: FIQL Kriterien im Format like query?queryCriteria=customerName=="customerName*",date=="date". Wobei es auch möglicch sein soll, Felder nur by name only or by date only abzufragen.
required: true
type: string
responses:
"200":
description: Aufträge
schema:
type: array
items:
$ref: "#/definitions/Order"
/order/{id}:
get:
summary: Auftragsdaten
description: Gibt auftrag zurück
produces:
- application/json
parameters:
- name: id
in: path
description: auftrags id
required: true
type: number
responses:
"200":
description: Auftrag
schema:
type: object
items:
$ref: "#/definitions/Order"
put:
summary: Auftrag updaten
description: Auftrag updaten
parameters:
- in: path
name: id
description: id zum Auftrag
required: true
type: number
- in: body
name: order
description: Ein Auftrag welcher aktualisiert werden soll.
required: true
schema:
$ref: "#/definitions/Order"
responses:
"200":
description: Auftrag erfolgreich aktualisiert
schema:
type: object
items:
$ref: "#/definitions/Order"
delete:
summary: Auftrag entfernen
description: Auftrag entefernen
parameters:
- name: id
in: path
description: auftrags id
required: true
type: number
responses:
"204":
description: Erfolgreich entfernt
/order:
post:
summary: Auftrag erstellen
description: Auftrag erstellen
parameters:
- in: body
name: order
description: Ein Auftrag welcher angelegt werden soll.
required: true
schema:
$ref: "#/definitions/Order"
responses:
"200":
description: Auftrag
schema:
type: object
items:
$ref: "#/definitions/Order"
/inputinformations/{id}:
get:
summary: Anfangsinformationen für die App
description: Liefert Einzugsadresse(n), Auszugsadresse(n), Umzugsdatum und die berechnete Distanz
parameters:
- name: id
in: path
description: input informations id
required: true
type: number
produces:
- application/json
responses:
"200":
description: Start infos für die app
schema:
type: object
items:
$ref: "#/definitions/InputInformations"
/category/{id}:
get:
summary: Liefert eine Kategorie
description: Liefert eine Kategorie, wie Wohnzimmer, Schalfzimmer usw
parameters:
- name: id
in: path
description: Kategorie id
required: true
type: number
responses:
"200":
description: Kategorien
schema:
type: object
items:
$ref: "#/definitions/Category"
delete:
summary: Kategorie entfernen
description: Entfernt eine Kategorie by id
parameters:
- name: id
in: path
description: Kategorie id
required: true
type: number
responses:
"204":
description: Erfolgreich entfernt
/category/all:
get:
summary: Liefert alle Kategorien
description: Liefert alle Kategorien, wie Wohnzimmer, Schalfzimmer usw
responses:
"200":
description: Kategorien
schema:
type: array
items:
$ref: "#/definitions/Category"
/category:
post:
summary: erstell eine neue Kategorie
description: Erstellt eine neue Kategorie wie Wohnzimmer etc
parameters:
- name: category
in: body
description: neue Kategorie.
required: true
schema:
$ref: "#/definitions/Category"
responses:
"201":
description: Kategorie erfolgreich erstellt
schema:
type: object
items:
$ref: "#/definitions/Category"
/item/all:
get:
summary: Liefert alle Gegenstände
description: Liefert alle Gegenstände, wie Bett, Couch usw
responses:
"200":
description: Gegenstände
schema:
type: array
items:
$ref: "#/definitions/Item"
/item:
post:
summary: erstell ein neues Möbelstück
description: Erstellt neues möbelstück
parameters:
- name: item
in: body
description: neue Kategorie.
required: true
schema:
$ref: "#/definitions/Item"
responses:
"201":
description: Gegenstand erfolgreich erstellt
schema:
type: object
items:
$ref: "#/definitions/Item"
/item/{id}:
delete:
summary: Gegenstand entfernen
description: Entfernt ein Gegenstand by id
parameters:
- name: id
in: path
description: Gegenstand id
required: true
type: number
responses:
"204":
description: Erfolgreich entfernt
/service/all:
get:
summary: Liefert alle Leistungen
description: Liefert alle Gegenstände, wie Bett, Couch usw
responses:
"200":
description: Gegenstände
schema:
type: array
items:
$ref: "#/definitions/Service"
/service:
post:
summary: erstellt einen neuen Service
parameters:
- name: service
in: body
description: neue Kategorie.
required: true
schema:
$ref: "#/definitions/Service"
responses:
"201":
description: Leistung erfolgreich erstellt
schema:
type: object
items:
$ref: "#/definitions/Service"
/service/{id}:
delete:
summary: Service entfernen
description: Entfernt eine Leistung
parameters:
- name: id
in: path
description: Leistungs id
required: true
type: number
responses:
"204":
description: Erfolgreich entfernt
definitions:
Order:
type: object
description: Auftrag
properties:
id:
type: string
status:
type: string
description: Confirmed, notConfirmed, etc
customer:
type: object
description: Kunde
items:
$ref: "#/definitions/Customer"
date:
type: string
format: Datetime
description: Umzugsdatum
from:
type: object
description: Auszugsadresse
items:
$ref: "#/definitions/Adress"
to:
type: object
description: Einzugsadresse
items:
$ref: "#/definitions/Adress"
distance:
type: string
description: zu fahrende distanz
services:
type: array
description: Gebuchte Leistungen
items:
$ref: "#/definitions/Service"
items:
type: array
description: ausgewählte Gegenstände
items:
$ref: "#/definitions/Item"
workersNumber:
type: number
description: Anzahl der Träger
transporterNumber:
type: number
description: Anzahl der Laster
text:
type: string
description: Freitext zum Auftrag
creationTime:
type: string
format: Datetime
description: Erstellungsdatum
usmFlag:
type: boolean
description: USM Möbel vorhanden
usmText:
type: string
description: USM Beschreibung
disposalFlag:
type: boolean
description: Entsorgung vorhanden
disposalText:
type: string
description: Entsorgung text
lupd:
type: string
format: Datetime
description: Last update
volume:
type: string
description: Umzugsgutvolumen
volumePrice:
type: string
description: Umzugsgutvolumen Preis
rideCosts:
type: string
description: Fahrtkosten
sum:
type: string
description: Gesamtsumme
Adress:
type: object
description: Adresse
properties:
area:
type: string
description: Wohnflaeche
personsNumber:
type: string
description: Anzahl der Personen
movementObject:
type: string
description: Umzugsobject
floor:
type: string
description: Etage
roomsNumber:
type: number
description: Zimmeranzahl
parkingSlot:
type: boolean
description: Halteverbotszone erwünscht?
liftType:
type: string
description: größe des Aufzuges
runningDistance:
type: string
description: Entfernung zwischen Be/Entladestelle und LKW
address:
type: string
description: Adresse
Customer:
type: object
description: Kunde
properties:
firstName:
type: string
description: Vorname
lastName:
type: string
description: Nachname
salutation:
type: string
description: Anrede
company:
type: string
description: Firma
telNumber:
type: string
description: Tel Nummer
email:
type: string
description: Email Adresse
Item:
type: object
description: Möbelgegenstand
properties:
categoryRefs:
type: array
description: Kategorien Referenzen, WZ SZ etc
items:
$ref: "#/definitions/Category"
name:
type: string
description: Name
id:
type: number
description: id
colli:
type: number
description: Anzahl
volume:
type: number
description: volumen
demontage:
type: boolean
description: Muss abgebaut werden
montage:
type: boolean
description: Muss aufgebaut werden
m100:
type: boolean
description: Mehr als 100 kg?
m150:
type: boolean
description: Mehr als 150 kg?
notDismountable:
type: boolean
description: Nicht zerlegbar
bulky:
type: boolean
description: Sperrig
extraPrice:
type: number
description: zusätzlicher Preis
Service:
type: object
description: Leistung
properties:
id:
type: number
name:
type: string
description: Leistungsname
tag:
type: string
description: Darstellungstag
colli:
type: number
description: Anzahl
description:
type: string
description: Leistungsbeschreibung
price:
type: number
description: Preis
Category:
type: object
description: Kategorie
properties:
id:
type: number
name:
type: string
description: name der Kategorie
InputInformations:
type: object
description: Eingangsinformation für die app
properties:
id:
type: number
description: id of input info
date:
type: string
format: Datetime
description: Umzugsdatum
from:
type: string
description: formatierte und validierte Auszugsadresse, als string
to:
type: string
description: formatierte und validierte Einzugsadresse, als string
distance:
type: string
description: zu fahrende Distanz
Option:
type: object
description: Wert zum Schlüssel
properties:
value:
type: string
description: value
Worker:
type: object
description: Angestellter
properties:
nick:
type: string
description: nickname
firstName:
type: string
description: Vorname
lastName:
type: string
description: Nachname
email:
type: string
description: email
tel:
type: string
description: Telefon
isDriver:
type: boolean
description: Fahrer?