Newer
Older
openapi: 3.0.1
info:
title: Airport Manager
description: |
Microservice Application for Airport Manager
contact:
name: Martin Slovik
email: 540485@mail.muni.cz
# insert your information as well
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: "1.1"
servers:
- url: "{scheme}://{server}:{port}"
description: my server
variables:
scheme:
default: http
enum:
- http
- https
server:
default: localhost
port:
default: "8080"
tags:
- name: Core
description: Microservice for core.
paths:
/api/stewards:
get:
tags:
- Steward
summary: Get all stewards.
Returns an array of objects representing stewards.
operationId: getAllStewards
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/StewardDto'

Martin Slovík
committed
post:
tags:
- Steward
summary: Create a new steward.

Martin Slovík
committed
description: |
Creates a new steward and returns it as a response.

Martin Slovík
committed
operationId: createSteward
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewStewardDtoRequest'
required: true
responses:
"201":
$ref: '#/components/responses/SingleStewardDtoResponse'
"400":
description: Input data not correct

Martin Slovík
committed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/stewards/{id}:
get:
tags:
- Steward

Martin Slovík
committed
summary: Get steward by id
description: Returns a steward by id.
operationId: getSteward
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StewardDto'
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'

Martin Slovík
committed
delete:
tags:
- Steward
summary: Delete steward by id.

Martin Slovík
committed
operationId: deleteSteward
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"204":
description: Deleted

Martin Slovík
committed
"404":
description: Not Found

Martin Slovík
committed
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
put:
tags:
- Steward
summary: Update steward by id.
operationId: updateSteward
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
description: |
Updates a steward by id and returns it as a response.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewStewardDtoRequest'
required: true
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
responses:
"200":
$ref: '#/components/responses/SingleStewardDtoResponse'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/stewards/{stewardId}/flights/{flightId}:
post:
tags:
- Steward
summary: Assign steward to a flight.
operationId: createStewardFlights
parameters:
- name: stewardId
in: path
required: true
schema:
type: integer
format: int64
- name: flightId
in: path
required: true
schema:
type: integer
format: int64
responses:
"201":
$ref: '#/components/responses/SingleStewardDtoResponse'
"400":
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
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
delete:
tags:
- Steward
summary: Delete assignment of steward to a flight.
operationId: deleteStewardFlights
parameters:
- name: stewardId
in: path
required: true
schema:
type: integer
format: int64
- name: flightId
in: path
required: true
schema:
type: integer
format: int64
responses:
"204":
description: Deleted
"404":
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/stewards/paged:
get:
tags:
- Steward
summary: Paged stewards
description: |
Returns a page of stewards.
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
The parameter `page` specifies zero-based index of the requested page,
and the parameter `size` specifies the size of the page.
operationId: getStewardsPaged
parameters:
- name: page
in: query
description: Zero-based page index (0..N)
required: false
schema:
minimum: 0
type: integer
default: 0
- name: size
in: query
description: The size of the page to be returned
required: false
schema:
minimum: 1
type: integer
default: 20
- name: sort
in: query
description: "Sorting criteria in the format: property,(asc|desc). Default\
\ sort order is ascending. Multiple sort criteria are supported."
required: false
schema:
type: array
items:
type: string
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PageStewardDto'
/api/flights:
get:
tags:
- Flight
summary: Get all flights.
Returns an array of objects representing flights.
operationId: getAllFlights
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/FlightDto'
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
post:
tags:
- Flight
summary: Create a new flight.
description: |
Creates a new flight and returns it as a response.
operationId: createFlight
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewFlightDtoRequest'
required: true
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/FlightDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/flights/{id}:
get:
tags:
- Flight
summary: Get flight by id.
description: |
Returns an object representing a flight.
operationId: getFlightById
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/FlightDto'
delete:
tags:
- Flight
summary: Delete flight by id.
operationId: deleteFlight
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"204":
description: Deleted
"404":
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
put:
tags:
- Flight
summary: Update flight by id.
operationId: updateFlight
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
description: Updates a flight by id and returns it as a response.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewFlightDtoRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/FlightDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
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
/api/airplaneTypes:
get:
tags:
- AirplaneType
summary: Get all airplane types.
description: |
Returns an array of objects representing airplane types.
operationId: getAllAirplaneTypes
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AirplaneTypeDto'
post:
tags:
- AirplaneType
summary: Create a new airplane type.
description: Creates a new airplane type and returns it as a response.
operationId: createAirplaneType
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewAirplaneTypeDtoRequest'
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
required: true
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/AirplaneTypeDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/airplaneTypes/{id}:
get:
tags:
- AirplaneType
summary: Get airplane type by id.
description: Returns an object representing an airplane type.
operationId: getAirplaneTypeById
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AirplaneTypeDto'
delete:
tags:
- AirplaneType
summary: Delete airplane type by id.
operationId: deleteAirplaneType
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"204":
description: Deleted
"404":
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
put:
tags:
- AirplaneType
summary: Update airplane type by id.
operationId: updateAirplaneType
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
description: Updates a airplane type by id and returns it as a response.
requestBody:
content:
application/json:
schema:

Martin Slovík
committed
$ref: '#/components/schemas/NewAirplaneTypeDtoRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AirplaneTypeDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
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
/api/airplanes:
get:
tags:
- Airplane
summary: Get all airplanes.
description: Returns an array of objects representing airplanes.
operationId: getAllAirplanes
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AirplaneDto'
post:
tags:
- Airplane
summary: Create a new airplane.
description: Creates a new airplane and returns it as a response.
operationId: createAirplane
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewAirplaneDtoRequest'
required: true
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/AirplaneDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/airplanes/{id}:
get:
tags:
- Airplane
summary: Get airplane by id.
description: Returns an object representing an airplane.
operationId: getAirplaneById
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AirplaneDto'
delete:
tags:
- Airplane
summary: Delete airplane by id.
operationId: deleteAirplane
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"204":
description: Deleted
"404":
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
put:
tags:
- Airplane
summary: Update airplane by id.
operationId: updateAirplane
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
description: Updates a airplane by id and returns it as a response.
requestBody:
content:
application/json:
schema:

Martin Slovík
committed
$ref: '#/components/schemas/NewAirplaneDtoRequest'
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
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AirplaneDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/airplanes/{airplaneId}/airplaneTypes/{airplaneTypeId}:
post:
tags:
- Airplane
summary: Assign airplane type to a airplane.
operationId: assignAirplaneType
parameters:
- name: airplaneId
in: path
required: true
schema:
type: integer
format: int64
- name: airplaneTypeId
in: path
required: true
schema:
type: integer
format: int64
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AirplaneDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
put:
tags:
- Airplane
summary: Update assignment of airplane type to an airplane.
operationId: updateAirplaneTypeAssignment
parameters:
- name: airplaneId
in: path
required: true
schema:
type: integer
format: int64
- name: airplaneTypeId
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AirplaneDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
delete:
tags:
- Airplane
summary: Delete assignment of airplane type to an airplane.
operationId: deleteAirplaneTypeAssignment
parameters:
- name: airplaneId
in: path
required: true
schema:
type: integer
format: int64
- name: airplaneTypeId
in: path
required: true
schema:
type: integer
format: int64
responses:
"204":
description: Deleted
"404":
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
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
/api/countries:
get:
tags:
- Country
summary: Get all countries.
description: Returns an array of objects representing countries.
operationId: getAllCountries
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CountryDto'
post:
tags:
- Country
summary: Create a new country.
description: Creates a new country and returns it as a response.
operationId: createCountry
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCountryDtoRequest'
required: true
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/CountryDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/countries/{id}:
get:
tags:
- Country
summary: Get country by id.
description: Returns an object representing a country.
operationId: getCountryById
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CountryDto'
delete:
tags:
- Country
summary: Delete country by id.
operationId: deleteCountry
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"204":
description: Deleted
"404":
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
put:
tags:
- Country
summary: Update country by id.
operationId: updateCountry
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
description: Updates a country by id and returns it as a response.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCountryDtoRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CountryDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
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
summary: Get all cities.
description: Returns an array of objects representing cities.
operationId: getAllCities
responses:
"200":
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CityDto'
post:
tags:
- City
summary: Create a new city.
description: Creates a new city and returns it as a response.
operationId: createCity
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCityDtoRequest'
required: true
responses:
"201":
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/CityDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/cities/{id}:
get:
tags:
- City
summary: Get city by id.
description: Returns an object representing a city.
operationId: getCityById
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CityDto'
delete:
tags:
- City
summary: Delete city by id.
operationId: deleteCity
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
responses:
"204":
description: Deleted
"404":
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
put:
tags:
- City
summary: Update city by id.
operationId: updateCity
parameters:
- name: id
in: path
required: true
schema:
type: integer
format: int64
description: Updates a city by id and returns it as a response.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/NewCityDtoRequest'
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
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CityDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
/api/cities/{cityId}/countries/{countryId}:
post:
tags:
- City
summary: Assign country to a city.
operationId: assignCountry
parameters:
- name: cityId
in: path
required: true
schema:
type: integer
format: int64
- name: countryId
in: path
required: true
schema:
type: integer
format: int64
responses:
"201":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CityDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
put:
tags:
- City
summary: Update assignment of country to a city.
operationId: updateCountryAssignment
parameters:
- name: cityId
in: path
required: true
schema:
type: integer
format: int64
- name: countryId
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/CityDto'
"400":
description: Input data not correct
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorMessage'
delete:
tags:
- City
summary: Delete assignment of country to a city.
operationId: deleteCountryAssignment
parameters:
- name: cityId
in: path
required: true
schema:
type: integer
format: int64
- name: countryId
in: path
required: true
schema:
type: integer
format: int64
responses:
"204":
description: Deleted
"404":
description: Not Found
content: