4
4
import com .cloudcomputing .ohhanahana .dto .response .RecommendResponse ;
5
5
import com .cloudcomputing .ohhanahana .dto .response .ShuttleResponse ;
6
6
import com .cloudcomputing .ohhanahana .service .BusService ;
7
+ import io .swagger .v3 .oas .annotations .Operation ;
8
+ import io .swagger .v3 .oas .annotations .tags .Tag ;
7
9
import jakarta .xml .bind .JAXBException ;
8
10
import lombok .RequiredArgsConstructor ;
9
11
import org .springframework .http .ResponseEntity ;
10
12
import org .springframework .web .bind .annotation .GetMapping ;
11
13
import org .springframework .web .bind .annotation .RequestMapping ;
12
14
import org .springframework .web .bind .annotation .RestController ;
13
15
16
+ @ Tag (name = "버스 API" , description = "버스 관련 API" )
14
17
@ RestController
15
18
@ RequiredArgsConstructor
16
19
@ RequestMapping ("/bus" )
17
20
public class BusController {
18
21
19
22
private final BusService busService ;
20
23
24
+ @ Operation (summary = "주변 정류장 버스 도착 정보 조회 API" , description = "주변 정류장 버스 도착 정보를 조회하는 API입니다." )
21
25
@ GetMapping ("/recommend" )
22
26
public ResponseEntity <RecommendResponse > recommendBus () {
23
27
try {
@@ -28,13 +32,15 @@ public ResponseEntity<RecommendResponse> recommendBus() {
28
32
}
29
33
}
30
34
35
+ @ Operation (summary = "셔틀버스 도착 정보 조회 API" , description = "셔틀버스 도착 정보를 조회하는 API입니다." )
31
36
@ GetMapping ("/shuttle" )
32
37
public ResponseEntity <ShuttleResponse > shuttleBus () {
33
38
return busService .getShuttleBus ()
34
39
.map (ResponseEntity ::ok )
35
40
.orElseGet (() -> ResponseEntity .ok (null ));
36
41
}
37
42
43
+ @ Operation (summary = "전체 버스 도착 정보 조회 API" , description = "전체 버스 도착 정보를 조회하는 API입니다." )
38
44
@ GetMapping
39
45
public ResponseEntity <BusResponse > findAllBus () {
40
46
try {
@@ -45,6 +51,7 @@ public ResponseEntity<BusResponse> findAllBus() {
45
51
}
46
52
}
47
53
54
+ @ Operation (summary = "511번 버스 도착 정보 조회 API" , description = "511번 버스 도착 정보를 조회하는 API입니다." )
48
55
@ GetMapping ("/511" )
49
56
public ResponseEntity <RecommendResponse .Bus > get511Bus () {
50
57
try {
0 commit comments