-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsomnia_beverage_store
1322 lines (1318 loc) · 43.6 KB
/
insomnia_beverage_store
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
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
_type: export
__export_format: 4
__export_date: 2022-06-26T20:25:33.082Z
__export_source: insomnia.desktop.app:v2022.4.2
resources:
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c840aadf9f0f
parentId: fld_83b3157c0d394833a09485461f053031
modified: 1656275026416
created: 1656273523928
url: "{{ base_url }}/crate/add"
name: Create New Crate
description: ""
method: POST
body:
mimeType: application/json
text: |-
{
"id": 0,
"bottle": {
"id": 0,
"name": "string",
"volume": 0,
"isAlcoholic": true,
"price": 0,
"inStock": 0,
"volumePercent": 0,
"supplier": "string",
"href": "string"
},
"noOfBottles": 0,
"price": 0,
"inStock": 0,
"href": "string"
}
parameters: []
headers:
- name: Content-Type
value: application/json
id: pair_b6aba0e460c84ca688d178b9c308e745
authentication: {}
metaSortKey: -1656273524033
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: fld_83b3157c0d394833a09485461f053031
parentId: wrk_0ee1dac2d83e480abe1f891394e7c840
modified: 1656274026354
created: 1656274026354
name: Crates
description: ""
environment: {}
environmentPropertyOrder: null
metaSortKey: -1656274026354
_type: request_group
- _id: wrk_0ee1dac2d83e480abe1f891394e7c840
parentId: null
modified: 1656274597046
created: 1656273461326
name: New Document
description: |-
# Beverage Store Service
- Order API
- Bottle API
- Crate API
scope: design
_type: workspace
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c840297e81e3
parentId: fld_83b3157c0d394833a09485461f053031
modified: 1656274851577
created: 1656273523932
url: "{{ base_url }}/crate/search"
name: Get All Crates
description: ""
method: GET
body: {}
parameters:
- name: page
disabled: true
value: "1"
id: pair_3c05a69137ed42bfa07dadaf4ec8164d
- name: pageLimit
disabled: true
value: "10"
id: pair_be8a60664b324535a1012f887a031678
- name: minPrice
disabled: true
value: "0"
id: pair_8f1160c4f9bd43288edbe540dd67827d
- name: maxPrice
disabled: true
value: "0"
id: pair_7dee374f2af4431d95ad535672762e93
headers: []
authentication: {}
metaSortKey: -1656273523983
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c8400e2ee0d3
parentId: fld_83b3157c0d394833a09485461f053031
modified: 1656275028971
created: 1656273523930
url: "{{ base_url }}/crate/{{ crateId }}"
name: Get a Crate by ID
description: ""
method: GET
body: {}
parameters: []
headers: []
authentication: {}
metaSortKey: -1656273523971.2812
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c840addacd68
parentId: fld_83b3157c0d394833a09485461f053031
modified: 1656275036790
created: 1656273523933
url: "{{ base_url }}/crate/list"
name: Search Crate
description: ""
method: GET
body: {}
parameters:
- name: page
disabled: true
value: "1"
id: pair_f053e2eb612640c9bf1d137dc9362dff
- name: pageLimit
disabled: true
value: "10"
id: pair_8eff22fd53434cbf8f3fee026d8a60c5
headers: []
authentication: {}
metaSortKey: -1656273523965.4219
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c840c7452fa5
parentId: fld_83b3157c0d394833a09485461f053031
modified: 1656274929225
created: 1656273523926
url: "{{ base_url }}/crate/update/{{ crateId }}"
name: Update Crate
description: ""
method: PUT
body:
mimeType: application/json
text: |-
{
"id": 0,
"bottle": {
"id": 0,
"name": "string",
"volume": 0,
"isAlcoholic": true,
"price": 0,
"inStock": 0,
"volumePercent": 0,
"supplier": "string",
"href": "string"
},
"noOfBottles": 0,
"price": 0,
"inStock": 0,
"href": "string"
}
parameters: []
headers:
- name: Content-Type
value: application/json
id: pair_772adba051b14d20af3a662269aaa457
authentication: {}
metaSortKey: -1656273523959.5625
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c840ca1b296b
parentId: fld_016641a7eff14c539ac16bb592c123af
modified: 1656274996433
created: 1656273523937
url: "{{ base_url }}/bottle/add"
name: Create New Bottle
description: ""
method: POST
body:
mimeType: application/json
text: |-
{
"id": 0,
"name": "string",
"volume": 0,
"isAlcoholic": true,
"price": 0,
"inStock": 0,
"volumePercent": 0,
"supplier": "string",
"href": "string"
}
parameters: []
headers:
- name: Content-Type
value: application/json
id: pair_d9864d9d284b4ba6add442cd76dfc0a9
authentication: {}
metaSortKey: -1656273605227.5
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: fld_016641a7eff14c539ac16bb592c123af
parentId: wrk_0ee1dac2d83e480abe1f891394e7c840
modified: 1656273633399
created: 1656273633399
name: Bottles
description: ""
environment: {}
environmentPropertyOrder: null
metaSortKey: -1656273633399
_type: request_group
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c8402553ed60
parentId: fld_016641a7eff14c539ac16bb592c123af
modified: 1656275004271
created: 1656273523938
url: "{{ base_url }}/bottle/{{ bottleId }}"
name: Get Bottle By ID
description: ""
method: GET
body: {}
parameters: []
headers: []
authentication: {}
metaSortKey: -1656273605177.5
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c840c76ae2ac
parentId: fld_016641a7eff14c539ac16bb592c123af
modified: 1656275011036
created: 1656273523941
url: "{{ base_url }}/bottle/list"
name: Get All Bottles
description: ""
method: GET
body: {}
parameters:
- name: page
disabled: true
value: "1"
id: pair_83e6ff8cd4a0402baf6c5a5eaf54bf58
- name: pageLimit
disabled: true
value: "10"
id: pair_eaba26d68c5b4d678651ee2b991dc9a8
headers: []
authentication: {}
metaSortKey: -1656273605127.5
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c840f0a18b72
parentId: fld_016641a7eff14c539ac16bb592c123af
modified: 1656275018858
created: 1656273523940
url: "{{ base_url }}/bottle/search"
name: Search Bottles
description: ""
method: GET
body: {}
parameters:
- name: page
disabled: true
value: "1"
id: pair_d7bb39b1f4314682870c9e8e8033970f
- name: pageLimit
disabled: true
value: "10"
id: pair_ce32d1ac6ce54657b3307ef3f491f274
- name: minPrice
disabled: true
value: "0"
id: pair_255e7a0ca3f44313a88a81f303ad4d7a
- name: maxPrice
disabled: true
value: "0"
id: pair_a062f4854d6a484d9af4ddd3f4678e51
headers: []
authentication: {}
metaSortKey: -1656273605102.5
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c8401ff2b21c
parentId: fld_016641a7eff14c539ac16bb592c123af
modified: 1656275020402
created: 1656273523935
url: "{{ base_url }}/bottle/update/{{ bottleId }}"
name: Update Bottle
description: ""
method: PUT
body:
mimeType: application/json
text: |-
{
"id": 0,
"name": "string",
"volume": 0,
"isAlcoholic": true,
"price": 0,
"inStock": 0,
"volumePercent": 0,
"supplier": "string",
"href": "string"
}
parameters: []
headers:
- name: Content-Type
value: application/json
id: pair_f43edb167a0549fc83302f26944f043f
authentication: {}
metaSortKey: -1656273605052.5
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c84026186bff
parentId: fld_00fd40627048454ba3b1de088e7675b3
modified: 1656274978546
created: 1656273523919
url: "{{ base_url }}/order/create"
name: Create/Submit new order
description: ""
method: POST
body:
mimeType: application/json
text: |-
{
"orderId": 0,
"orderItems": [
{
"id": 0,
"bottle": {
"id": 0,
"price": 0,
"beverageType": "string"
},
"noOfBottles": 0,
"price": true,
"inStock": 0,
"href": "string"
}
],
"price": 0,
"status": "string",
"href": "string"
}
parameters: []
headers:
- name: Content-Type
value: application/json
id: pair_494eac43d8144c54b19ab7c74599b899
authentication: {}
metaSortKey: -1656273524066
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: fld_00fd40627048454ba3b1de088e7675b3
parentId: wrk_0ee1dac2d83e480abe1f891394e7c840
modified: 1656273576756
created: 1656273576756
name: Orders
description: ""
environment: {}
environmentPropertyOrder: null
metaSortKey: -1656273576756
_type: request_group
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c84052c7de1b
parentId: fld_00fd40627048454ba3b1de088e7675b3
modified: 1656274960735
created: 1656273523921
url: "{{ base_url }}/order/list"
name: Get All Orders
description: ""
method: GET
body: {}
parameters:
- name: page
disabled: true
value: "1"
id: pair_a18c303c8d5d4e1ebd6f8d97c87c650d
- name: pageLimit
disabled: true
value: "10"
id: pair_f9cd9692529143dcb403987e832a1b51
headers: []
authentication: {}
metaSortKey: -1656273524016
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c8404cb6ae7d
parentId: fld_00fd40627048454ba3b1de088e7675b3
modified: 1656274966502
created: 1656273523923
url: "{{ base_url }}/order/{{ orderId }}"
name: Get Order By ID
description: ""
method: GET
body: {}
parameters: []
headers: []
authentication: {}
metaSortKey: -1656273523966
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c84094a89c5b
parentId: fld_00fd40627048454ba3b1de088e7675b3
modified: 1656274989066
created: 1656273523916
url: "{{ base_url }}/order/update/{{ orderId }}"
name: Update Order
description: ""
method: PUT
body:
mimeType: application/json
text: |-
{
"orderId": 0,
"orderItems": [
{
"id": 0,
"bottle": {
"id": 0,
"price": 0,
"beverageType": "string"
},
"noOfBottles": 0,
"price": true,
"inStock": 0,
"href": "string"
}
],
"price": 0,
"status": "string",
"href": "string"
}
parameters: []
headers:
- name: Content-Type
value: application/json
id: pair_34ef0b0a7722419fad4e65a477e19479
authentication: {}
metaSortKey: -1656273523961.3125
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c8409e729fb1
parentId: fld_00fd40627048454ba3b1de088e7675b3
modified: 1656274973691
created: 1656273523913
url: "{{ base_url }}/order/process/{{ orderId }}/{{ status }}"
name: Update Order Status
description: ""
method: GET
body: {}
parameters: []
headers: []
authentication: {}
metaSortKey: -1656273523956.625
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: req_wrk_0ee1dac2d83e480abe1f891394e7c8405fd242a2
parentId: fld_00fd40627048454ba3b1de088e7675b3
modified: 1656273603494
created: 1656273523908
url: "{{ base_url }}/order/delete/{{ orderId }}"
name: Delete Order
description: ""
method: DELETE
body: {}
parameters: []
headers: []
authentication: {}
metaSortKey: -1656273523941
isPrivate: false
settingStoreCookies: true
settingSendCookies: true
settingDisableRenderRequestBody: false
settingEncodeUrl: true
settingRebuildPath: true
settingFollowRedirects: global
_type: request
- _id: env_04526fb5f700c4bf4a718d0a45c6d813cc706e2b
parentId: wrk_0ee1dac2d83e480abe1f891394e7c840
modified: 1656273880477
created: 1656273461361
name: Base Environment
data:
base_url: "{{ scheme }}://{{ host }}{{ base_path }}"
dataPropertyOrder:
"&":
- base_url
color: null
isPrivate: false
metaSortKey: 1656273461361
_type: environment
- _id: jar_04526fb5f700c4bf4a718d0a45c6d813cc706e2b
parentId: wrk_0ee1dac2d83e480abe1f891394e7c840
modified: 1656273461370
created: 1656273461370
name: Default Jar
cookies: []
_type: cookie_jar
- _id: spc_47bec5620ce346769418d3e3c4a458a1
parentId: wrk_0ee1dac2d83e480abe1f891394e7c840
modified: 1656275044207
created: 1656273461352
fileName: Beverage Store
contents: >-
openapi: "3.0.3"
# general information
info:
title: Beverage Store Service
version: "1.0"
description: | # | for multi line description
Summer is coming and we are all looking forward to having a barbecue with friends.
For a nice barbecue, we also need some refreshing drinks. Therefore, we want to start a
new business where we sell beverages and deliver them to people.
contact:
name: Group 6
url: https://gitlab.rz.uni-bamberg.de/dsg/soa/group6
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: http://localhost:9999/v1
description: Development Server
components:
schemas:
BottleDTO:
type: object
required:
- name
- volume
- isAlcoholic
- volumePercent
- price
- inStock
properties:
id:
type: integer
name:
type: string
volume:
type: number
isAlcoholic:
type: boolean
price:
type: number
inStock:
type: integer
volumePercent:
type: number
supplier:
type: string
href:
type: string
CrateDTO:
type: object
required:
- bottle
- noOfBottles
- price
- inStock
properties:
id:
type: integer
bottle:
$ref: "#/components/schemas/BottleDTO"
noOfBottles:
type: number
price:
type: number
inStock:
type: number
href:
type: string
OrderDTO:
type: object
required:
- orderItems
- price
- status
properties:
orderId:
type: integer
orderItems:
type: array
items:
$ref: "#/components/schemas/OrderItemDTO"
price:
type: number
status:
type: string
href:
type: string
OrderItemDTO:
type: object
required:
- number
- beverage
- quantity
properties:
id:
type: integer
bottle:
$ref: "#/components/schemas/BeverageDTO"
noOfBottles:
type: number
price:
type: boolean
inStock:
type: number
href:
type: string
BeverageDTO:
type: object
required:
- id
- price
- beverageType
properties:
id:
type: integer
price:
type: number
beverageType:
type: string
Pagination:
type: object
properties:
page:
type: number
noOfPages:
type: number
first:
type: string
previous:
type: string
next:
type: string
last:
type: string
PaginatedBottles:
type: object
properties:
pagination:
$ref: "#/components/schemas/Pagination"
bottles:
type: array
items:
$ref: "#/components/schemas/BottleDTO"
href:
type: string
PaginatedCrates:
type: object
properties:
pagination:
$ref: "#/components/schemas/Pagination"
crates:
type: array
items:
$ref: "#/components/schemas/CrateDTO"
href:
type: string
PaginatedOrders:
type: object
properties:
pagination:
$ref: "#/components/schemas/Pagination"
crates:
type: array
items:
$ref: "#/components/schemas/CrateDTO"
href:
type: string
ErrorMessage:
type: object
properties:
errorType:
type: string
message:
type: string
# resources (one of the REST principles)
paths:
/bottle/list:
get:
summary: Get All Bottles
# request parameters
parameters:
- name: page
in: query
schema:
type: number
default: 1
- name: pageLimit
in: query
schema:
type: number
default: 10
# possible responses and their parameters
responses:
"200":
description: List of all bottles
content:
application/json:
schema:
$ref: "#/components/schemas/PaginatedBottles"
"400":
description: A bad request initiated by the user
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorMessage"
tags:
- Bottle Endpoints
/bottle/search:
get:
summary: Bottle Search
# request parameters
parameters:
- name: page
in: query
schema:
type: number
default: 1
- name: pageLimit
in: query
schema:
type: number
default: 10
- name: minPrice
in: query
schema:
type: number
- name: maxPrice
in: query
schema:
type: number
responses:
"200":
description: List of all bottles
content:
application/json:
schema:
$ref: "#/components/schemas/PaginatedBottles"
"400":
description: Message body was empty
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorMessage"
tags:
- Bottle Endpoints
/bottle/{bottleId}:
get:
summary: Get a Bottle By ID
# request parameters
parameters:
- name: bottleId
in: path
required: true
schema:
type: integer
responses:
"200":
description: Bottle Response
content:
application/json:
schema:
$ref: "#/components/schemas/BottleDTO"
"400":
description: Message body was empty
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorMessage"
tags:
- Bottle Endpoints
/bottle/add:
post:
summary: Create New Bottle
# request parameters
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/BottleDTO"
responses:
"200":
description: Bottle Response
content:
application/json:
schema:
$ref: "#/components/schemas/BottleDTO"
"400":
description: Message body was empty
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorMessage"
tags:
- Bottle Endpoints
/bottle/update/{bottleId}:
put:
summary: Update Bottle
# request parameters
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/BottleDTO"
parameters:
- name: bottleId
in: path
required: true
schema:
type: integer
responses:
"200":
description: Updated Bottle Response
content:
application/json:
schema:
$ref: "#/components/schemas/BottleDTO"
"400":
description: Message body was empty
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorMessage"
tags:
- Bottle Endpoints
/crate/list:
get:
summary: Get All Crates
# request parameters
parameters:
- name: page
in: query
schema:
type: number
default: 1
- name: pageLimit
in: query
schema:
type: number
default: 10
# possible responses and their parameters
responses:
"200":
description: List of all crates
content:
application/json:
schema:
$ref: "#/components/schemas/PaginatedCrates"
"400":
description: A bad request initiated by the user
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorMessage"
tags:
- Crate Endpoints
/crate/search:
get:
summary: Search Crates
# request parameters
parameters:
- name: page
in: query
schema:
type: number
default: 1
- name: pageLimit
in: query
schema:
type: number
default: 10
- name: minPrice
in: query
schema:
type: number
- name: maxPrice
in: query
schema:
type: number
responses:
"200":
description: List of all crates
content:
application/json:
schema:
$ref: "#/components/schemas/PaginatedCrates"
"400":
description: Message body was empty
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorMessage"
tags:
- Crate Endpoints
/crate/{crateId}:
get:
summary: Get a Crate by ID
# request parameters
parameters:
- name: crateId
in: path
required: true
schema: