-
Notifications
You must be signed in to change notification settings - Fork 1
/
swaggerAPI.yml
1090 lines (1052 loc) · 29.7 KB
/
swaggerAPI.yml
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
/api/odsjek/AddNewOdsjek:
post:
tags:
- Odsjek
name: User Story 269 - Administrator dodaje novi odsjek u bazi podataka
summary: User Story 269 - Administrator dodaje novi odsjek u bazi podataka
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
naziv:
type: string
responses:
200:
description: Odsjek je dodan u bazi
400:
description: Došlo je do greške
/api/odsjek/DeleteOdsjek:
delete:
tags:
- Odsjek
name: User Story 397 - Administrator briše odsjek iz baze zbog vanjskih zahtjeva
summary: User Story 397 - Administrator briše odsjek iz baze zbog vanjskih zahtjeva
consumes:
- application/json
parameters:
- name: naziv
in: query
schema:
type: object
properties:
naziv:
type: string
responses:
200:
description: Odsjek nije više u bazi
400:
description: Došlo je do greške
/api/odsjek/GetOdsjeci:
get:
tags:
- Odsjek
name: User Story 252 - Administrator kreira listu svih odsjeka iz baze podataka
summary: User Story 252 - Administrator kreira listu svih odsjeka iz baze podataka
consumes:
- application/json
responses:
200:
description: Dobivena je lista odsjeka
/api/odsjek/GetOdsjek:
get:
tags:
- Odsjek
name: User Story 383 - Administrator mora imati mogućnost ažuriranja podataka o odsjeku u bazi podataka
summary: User Story 383 - Administrator mora imati mogućnost ažuriranja podataka o odsjeku u bazi podataka
consumes:
- application/json
parameters:
- name: naziv
in: query
schema:
type: object
properties:
naziv:
type: string
responses:
200:
description: Vraca se odsjek
400:
description: Odsjek nije u bazi
/api/odsjek/PromijeniOdsjek:
post:
tags:
- Odsjek
name: User Story 383 - Administrator mora imati mogućnost ažuriranja podataka o odsjeku u bazi podataka
summary: User Story 383 - Administrator mora imati mogućnost ažuriranja podataka o odsjeku u bazi podataka
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
idOdsjek:
type: string
naziv:
type: string
responses:
200:
description: Odsjek je promjenjen
400:
description: Došlo je do greške
/api/odsjek/PretraziOdsjekPredmet:
get:
tags:
- Odsjek
name: User Story 274 - Administrator filtrira listu odsjeka i predmeta iz baze podataka na osnovu unesenih vrijednosti
summary: User Story 274 - Administrator filtrira listu odsjeka i predmeta iz baze podataka na osnovu unesenih vrijednosti
consumes:
- application/json
parameters:
- name: idOdsjek
in: query
schema:
type: object
properties:
idOdsjek:
type: string
- name: godina
in: query
schema:
type: object
properties:
godina:
type: string
- name: ciklus
in: query
schema:
type: object
properties:
ciklus:
type: string
- name: semestar
in: query
schema:
type: object
properties:
semestar:
type: string
- name: obavezan
in: query
schema:
type: object
properties:
obavezan:
type: string
responses:
200:
description: Vraca se lista predmeta
400:
description: Došlo je do greške
/api/predmet/GetPredmeti:
get:
tags:
- Predmet
name: User Story 253 - Administrator kreira listu svih predmeta na fakultetu iz baze podataka
summary: User Story 253 - Administrator kreira listu svih predmeta na fakultetu iz baze podataka
consumes:
- application/json
responses:
200:
description: Dobivena je lista predmeta
/api/predmet/AddNewPredmet:
post:
tags:
- Predmet
name: User Story 268 - Administrator dodaje novi predmet u bazi podataka
summary: User Story 268 - Administrator dodaje novi predmet u bazi podataka
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
naziv:
type: string
ects:
type: string
brojPredavanja:
type: string
brojVjezbi:
type: string
opis:
type: string
responses:
200:
description: Predmet je dodan u bazi
400:
description: Došlo je do greške
/api/predmet/GetPredmet:
get:
tags:
- Predmet
name: User Story 382 - Administrator mora imati mogućnost ažuriranja podataka o predmetu u bazi podataka
summary: User Story 382 - Administrator mora imati mogućnost ažuriranja podataka o predmetu u bazi podataka
consumes:
- application/json
parameters:
- name: naziv
in: query
schema:
type: object
properties:
naziv:
type: string
responses:
200:
description: Vraca se predmet
400:
description: Predmet nije u bazi
/api/predmet/PromijeniPredmet:
post:
tags:
- Predmet
name: User Story 382 - Administrator mora imati mogućnost ažuriranja podataka o predmetu u bazi podataka
summary: User Story 382 - Administrator mora imati mogućnost ažuriranja podataka o predmetu u bazi podataka
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
Id:
type: string
naziv:
type: string
ects:
type: string
brojPredavanja:
type: string
brojVjezbi:
type: string
opis:
type: string
responses:
200:
description: Predmet je promjenjen
400:
description: Došlo je do greške
/api/korisnik/AddNewStudent:
post:
tags:
- Korisnik
name: User Story 264 - Administrator treba imati mogućnost da doda novog studenta u bazu podataka
summary: User Story 264 - Administrator treba imati mogućnost da doda novog studenta u bazu podataka
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
idOdsjek:
type: string
idUloga:
type: string
ime:
type: string
prezime:
type: string
datumRodjenja:
type: string
format: date
JMBG:
type: string
email:
type: string
mjestoRodjenja:
type: string
kanton:
type: string
drzavljanstvo:
type: string
telefon:
type: string
spol:
type: string
imePrezimeMajke:
type: string
imePrezimeOca:
type: string
adresa:
type: string
linkedin:
type: string
website:
type: string
responses:
200:
description: Student je dodan u bazi
400:
description: Došlo je do greške
/api/korisnik/GetLoginDataForProfessor:
get:
tags:
- Korisnik
name: User Story 255 - Administrator generiše username i password za profesora radi spašavanja u bazu podataka(Alpha-US-372)
summary: User Story 255 - Administrator generiše username i password za profesora radi spašavanja u bazu podataka(Alpha-US-372)
consumes:
- application/json
parameters:
- name: ime
in: query
schema:
type: object
properties:
ime:
type: string
- name: prezime
in: query
schema:
type: object
properties:
prezime:
type: string
responses:
200:
description: Vraća se username i password profesora
400:
description: Profesor nije u bazi
/api/korisnik/AddNewProfessor:
post:
tags:
- Korisnik
name: User Story 266 - Administrator treba imati mogućnost dodavanja novog profesora u bazu podataka (Alpha-US-372)
summary: User Story 266 - Administrator treba imati mogućnost dodavanja novog profesora u bazu podataka (Alpha-US-372)
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
idOdsjek:
type: string
idUloga:
type: string
ime:
type: string
prezime:
type: string
datumRodjenja:
type: string
JMBG:
type: string
email:
type: string
mjestoRodjenja:
type: string
kanton:
type: string
drzavljanstvo:
type: string
telefon:
type: string
spol:
type: string
imePrezimeMajke:
type: string
imePrezimeOca:
type: string
adresa:
type: string
linkedin:
type: string
website:
type: string
titula:
type: string
responses:
200:
description: Profesor je dodan u bazi
400:
description: Došlo je do greške
/api/predmet/deleteSubject:
delete:
tags:
- Predmet
name: User Story 236 - Administrator briše predmet sa odsjeka da bi uklonio nepostojeće predmete
summary: User Story 236 - Administrator briše predmet sa odsjeka da bi uklonio nepostojeće predmete
consumes:
- application/json
parameters:
- name: naziv
in: query
schema:
type: object
properties:
naziv:
type: string
responses:
200:
description: Korisnik je izbrisan
400:
description: Profesor nije u bazi
/api/korisnik/searchProfessor:
get:
tags:
- Korisnik
name: User Story 249 - Administrator kreira listu svih profesora iz baze prema zadanom tekstu pretrage radi prikaza
summary: User Story 249 - Administrator kreira listu svih profesora iz baze prema zadanom tekstu pretrage radi prikaza
consumes:
- application/json
parameters:
- name: ime
in: query
schema:
type: object
properties:
ime:
type: string
- name: prezime
in: query
schema:
type: object
properties:
prezime:
type: string
- name: username
in: query
schema:
type: object
properties:
username:
type: string
responses:
200:
description: Vraca se profesor
400:
description: Profesor nije u bazi
/api/korisnik/searchAssistant:
get:
tags:
- Korisnik
name: User Story 250 - Administrator kreira listu svih asistenata iz baze prema zadanom tekstu pretrage radi prikaza
summary: User Story 250 - Administrator kreira listu svih asistenata iz baze prema zadanom tekstu pretrage radi prikaza
consumes:
- application/json
parameters:
- name: ime
in: query
schema:
type: object
properties:
ime:
type: string
- name: prezime
in: query
schema:
type: object
properties:
prezime:
type: string
- name: username
in: query
schema:
type: object
properties:
username:
type: string
responses:
200:
description: Vraća se asistent
400:
description: Došlo je do greške
/api/korisnik/searchStudent:
get:
tags:
- Korisnik
name: User Story 251 - Administrator kreira listu svih studenata iz baze prema zadanom tekstu pretrage radi prikaza
summary: User Story 251 - Administrator kreira listu svih studenata iz baze prema zadanom tekstu pretrage radi prikaza
consumes:
- application/json
parameters:
- name: ime
in: query
schema:
type: object
properties:
ime:
type: string
- name: prezime
in: query
schema:
type: object
properties:
prezime:
type: string
- name: username
in: query
schema:
type: object
properties:
username:
type: string
responses:
200:
description: Vraća se asistent
400:
description: Došlo je do greške
/api/korisnik/updateStudent:
post:
tags:
- Korisnik
name: User Story 259 - Administrator mora imati mogućnost ažuriranja podataka o studentu u bazi podatak
summary: User Story 259 - Administrator mora imati mogućnost ažuriranja podataka o studentu u bazi podatak
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
id:
type: string
ime:
type: string
prezime:
type: string
email:
type: string
telefon:
type: string
adresa:
type: string
indeks:
type: string
responses:
200:
description: Student je azuriran
400:
description: Došlo je do greške
/api/korisnik/updateAssistant:
post:
tags:
- Korisnik
name: User Story 258 - Administrator mora da ima mogućnost ažuriranje podataka o asistentu u bazi podataka
summary: User Story 258 - Administrator mora da ima mogućnost ažuriranje podataka o asistentu u bazi podataka
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
id:
type: string
ime:
type: string
prezime:
type: string
email:
type: string
telefon:
type: string
adresa:
type: string
responses:
200:
description: Asistent je azuriran
400:
description: Došlo je do greške
/api/korisnik/updateProfessor:
post:
tags:
- Korisnik
name: User Story 257 - Administrator mora da ima mogućnost ažuriranje podataka o profesoru u bazi podataka
summary: User Story 257 - Administrator mora da ima mogućnost ažuriranje podataka o profesoru u bazi podataka
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
odsjek:
type: string
ime:
type: string
prezime:
type: string
datumRodjenja:
type: string
format: date
JMBG:
type: string
email:
type: string
mjestoRodjenja:
type: string
kanton:
type: string
drzavljanstvo:
type: string
telefon:
type: string
spol:
type: string
imePrezimeMajke:
type: string
imePrezimeOca:
type: string
adresa:
type: string
username:
type: string
linkedin:
type: string
website:
type: string
titula:
type: string
responses:
200:
description: Profesor je azuriran
400:
description: Došlo je do greške
/api/korisnik/GetLoginData:
get:
tags:
- Korisnik
name: User Story 254 - Administrator generiše indeks, username i password za studenta/asistenta radi spašavanja u bazu podataka
summary: User Story 254 - Administrator generiše indeks, username i password za studenta/asistenta radi spašavanja u bazu podataka
consumes:
- application/json
parameters:
- name: ime
in: query
schema:
type: object
properties:
ime:
type: string
- name: prezime
in: query
schema:
type: object
properties:
prezime:
type: string
responses:
200:
description: Vraca se username, password i indeks studenta
400:
description: Profesor nije u bazi
/api/korisnik/AddNewAssistant:
post:
tags:
- Korisnik
name: User Story 265 - Administrator treba imati mogućnost dodavanja novog asistenta u bazu podataka
summary: User Story 265 - Administrator treba imati mogućnost dodavanja novog asistenta u bazu podataka
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
idOdsjek:
type: string
idUloga:
type: string
ime:
type: string
prezime:
type: string
datumRodjenja:
type: string
format: date
JMBG:
type: string
email:
type: string
mjestoRodjenja:
type: string
kanton:
type: string
drzavljanstvo:
type: string
telefon:
type: string
spol:
type: string
imePrezimeMajke:
type: string
imePrezimeOca:
type: string
adresa:
type: string
linkedin:
type: string
website:
type: string
responses:
200:
description: Asistent je dodan u bazi
400:
description: Došlo je do greške
/api/korisnik/GetNewPassword:
get:
tags:
- Korisnik
name: User Story 263 - Administrator treba moći da izmjeni šifre i generiše nove po potrebi
summary: User Story 263 - Administrator treba moći da izmjeni šifre i generiše nove po potrebi
consumes:
- application/json
parameters:
- name: username
in: query
schema:
type: object
properties:
username:
type: string
responses:
200:
description: Vraca se novi password korisnika
400:
description: Profesor nije u bazi
/api/korisnik/searchUser:
get:
tags:
- Korisnik
name: User Story 332 - Administrator pretražuje osobe po imenu i prezimenu iz baze
summary: User Story 332 - Administrator pretražuje osobe po imenu i prezimenu iz baze
consumes:
- application/json
parameters:
- name: ime
in: query
schema:
type: object
properties:
ime:
type: string
- name: prezime
in: query
schema:
type: object
properties:
prezime:
type: string
- name: username
in: query
schema:
type: object
properties:
username:
type: string
responses:
200:
description: Vraca se lista korisnika
400:
description: Doslo je do greske
/api/korisnik/promoteStudentToAssistant:
post:
tags:
- Korisnik
name: User Story 262 - Administrator salje zahtjev sa stranice za unaprijeđenje studenta u asistenta
summary: User Story 262 - Administrator salje zahtjev sa stranice za unaprijeđenje studenta u asistenta
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
id:
type: string
responses:
200:
description: Student je sad asistent
400:
description: Doslo je do greske
/api/korisnik/promoteAssistantToProfessor:
post:
tags:
- Korisnik
name: User Story 261 - Administrator šalje zahtjev sa stranice za unaprijeđenje asistenta u profesora
summary: User Story 261 - Administrator šalje zahtjev sa stranice za unaprijeđenje asistenta u profesora
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
id:
type: string
responses:
200:
description: Asistent je sad profesor
400:
description: Doslo je do greske
/api/korisnik/enrollStudentToSemester:
post:
tags:
- Korisnik
name: User Story 271 - Administrator povezuje predmet-student i stavlja vezu u bazi podataka te upisuje studenta u semestar
summary: User Story 271 - Administrator povezuje predmet-student i stavlja vezu u bazi podataka te upisuje studenta u semestar
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
ciklus:
type: string
semestar:
type: string
username:
type: string
odsjek:
type: string
responses:
200:
description: Student je upisan
400:
description: Doslo je do greske
/api/povezivanje/SpojiOdsjekPredmet:
post:
tags:
- Povezivanje
name: User Story 270 - Administrator povezuje predmet-odsjek-semestar-ciklus-tip i stavlja vezu u bazi podataka
summary: User Story 270 - Administrator povezuje predmet-odsjek-semestar-ciklus-tip i stavlja vezu u bazi podataka
consumes:
- application/json
parameters:
- name: body
in: body
schema:
type: object
properties:
idOdsjek:
type: string
idPredmet:
type: string
godina:
type: string
ciklus:
type: string
semestar:
type: string
obavezan:
type: string
responses:
200:
description: Predmet i odsjek su povezani
400:
description: Došlo je do greške
/api/korisnik/getAllStudents:
get:
tags:
- Korisnik
name: User Story 436 - Administrator treba imati mogućnost vraćanja liste svih studenata/asistenata/profesora
summary: User Story 436 - Administrator treba imati mogućnost vraćanja liste svih studenata/asistenata/profesora
consumes:
- application/json
responses:
200:
description: Dobivena je lista studenata
/api/korisnik/deleteStudent:
delete:
tags:
- Korisnik
name: User Story 402 - Administrator ima mogućnost brisanja studenta zbog vanjskih zahtjeva
summary: User Story 402 - Administrator ima mogućnost brisanja studenta zbog vanjskih zahtjeva
consumes:
- application/json
parameters:
- name: id
in: query
schema:
type: object
properties:
id:
type: string
responses:
200:
description: Student obrisan
400:
description: Došlo je do greške
/api/korisnik/getAllProfessors:
get:
tags:
- Korisnik
name: User Story 436 - Administrator treba imati mogućnost vraćanja liste svih studenata/asistenata/profesora
summary: User Story 436 - Administrator treba imati mogućnost vraćanja liste svih studenata/asistenata/profesora
consumes:
- application/json
responses:
200:
description: Dobivena je lista profesora
/api/korisnik/getAllAssistants:
get:
tags:
- Korisnik
name: User Story 436 - Administrator treba imati mogućnost vraćanja liste svih studenata/asistenata/profesora
summary: User Story 436 - Administrator treba imati mogućnost vraćanja liste svih studenata/asistenata/profesora
consumes:
- application/json
responses:
200:
description: Dobivena je lista asistenata
/api/korisnik/deleteProfessor:
delete:
tags:
- Korisnik
name: User Story 397 - Administrator briše odsjek iz baze zbog vanjskih zahtjeva
summary: User Story 397 - Administrator briše odsjek iz baze zbog vanjskih zahtjeva
consumes:
- application/json
parameters:
- name: id
in: query
schema:
type: object
properties:
id:
type: string
responses:
200:
description: Profesor nije više u bazi
400:
description: Došlo je do greške
/api/korisnik/deleteAssistant:
delete:
tags:
- Korisnik
name: User Story 404 - Administrator ima mogućnost brisanja asistenta zbog vanjskih zahtjeva
summary: User Story 404 - Administrator ima mogućnost brisanja asistenta zbog vanjskih zahtjeva
consumes:
- application/json
parameters:
- name: id
in: query
schema:
type: object
properties:
id:
type: string
responses:
200:
description: Asistent nije više u bazi
400:
description: Došlo je do greške
/api/korisnik/getPredmetiAsisProf:
get:
tags:
- Korisnik
name: User Story 443 - Administrator treba imati mogućnost dobivanja listu predmeta iz baze podataka na koje asistent/profesor drži
summary: User Story 443 - Administrator treba imati mogućnost dobivanja listu predmeta iz baze podataka na koje asistent/profesor drži
consumes:
- application/json
parameters:
- name: idKorisnik