commit
c6dfc74bda
@ -20,6 +20,10 @@ public class SwaggerConfig {
|
|||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public OpenAPI openAPI() {
|
public OpenAPI openAPI() {
|
||||||
|
Server vmServer = new Server();
|
||||||
|
vmServer.setUrl("http://kt-event-marketing-api.20.214.196.128.nip.io/api/v1/ai");
|
||||||
|
vmServer.setDescription("VM Development Server");
|
||||||
|
|
||||||
Server localServer = new Server();
|
Server localServer = new Server();
|
||||||
localServer.setUrl("http://localhost:8083");
|
localServer.setUrl("http://localhost:8083");
|
||||||
localServer.setDescription("Local Development Server");
|
localServer.setDescription("Local Development Server");
|
||||||
@ -59,6 +63,6 @@ public class SwaggerConfig {
|
|||||||
|
|
||||||
return new OpenAPI()
|
return new OpenAPI()
|
||||||
.info(info)
|
.info(info)
|
||||||
.servers(List.of(localServer, devServer, prodServer));
|
.servers(List.of(vmServer, localServer, devServer, prodServer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import java.util.Map;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "Internal API", description = "내부 서비스 간 통신용 API")
|
@Tag(name = "Internal API", description = "내부 서비스 간 통신용 API")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/v1/ai-service/internal/jobs")
|
@RequestMapping("/jobs")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class InternalJobController {
|
public class InternalJobController {
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ import java.util.Set;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "Internal API", description = "내부 서비스 간 통신용 API")
|
@Tag(name = "Internal API", description = "내부 서비스 간 통신용 API")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/v1/ai-service/internal/recommendations")
|
@RequestMapping("/recommendations")
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class InternalRecommendationController {
|
public class InternalRecommendationController {
|
||||||
|
|
||||||
|
|||||||
@ -25,9 +25,8 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
* @since 2025-01-24
|
* @since 2025-01-24
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@CrossOrigin(origins = "http://localhost:3000")
|
@RequestMapping
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/v1")
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class ParticipationController {
|
public class ParticipationController {
|
||||||
|
|
||||||
@ -35,9 +34,9 @@ public class ParticipationController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 이벤트 참여
|
* 이벤트 참여
|
||||||
* POST /participations/{eventId}/participate
|
* POST /events/{eventId}/participate
|
||||||
*/
|
*/
|
||||||
@PostMapping("/participations/{eventId}/participate")
|
@PostMapping("/events/{eventId}/participate")
|
||||||
public ResponseEntity<ApiResponse<ParticipationResponse>> participate(
|
public ResponseEntity<ApiResponse<ParticipationResponse>> participate(
|
||||||
@PathVariable String eventId,
|
@PathVariable String eventId,
|
||||||
@Valid @RequestBody ParticipationRequest request) {
|
@Valid @RequestBody ParticipationRequest request) {
|
||||||
@ -61,15 +60,14 @@ public class ParticipationController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 참여자 목록 조회
|
* 참여자 목록 조회
|
||||||
* GET /participations/{eventId}/participants
|
* GET /events/{eventId}/participants
|
||||||
* GET /events/{eventId}/participants (프론트엔드 호환)
|
|
||||||
*/
|
*/
|
||||||
@Operation(
|
@Operation(
|
||||||
summary = "참여자 목록 조회",
|
summary = "참여자 목록 조회",
|
||||||
description = "이벤트의 참여자 목록을 페이징하여 조회합니다. " +
|
description = "이벤트의 참여자 목록을 페이징하여 조회합니다. " +
|
||||||
"정렬 가능한 필드: createdAt(기본값), participantId, name, phoneNumber, bonusEntries, isWinner, wonAt"
|
"정렬 가능한 필드: createdAt(기본값), participantId, name, phoneNumber, bonusEntries, isWinner, wonAt"
|
||||||
)
|
)
|
||||||
@GetMapping({"/participations/{eventId}/participants", "/events/{eventId}/participants"})
|
@GetMapping({"/events/{eventId}/participants"})
|
||||||
public ResponseEntity<ApiResponse<PageResponse<ParticipationResponse>>> getParticipants(
|
public ResponseEntity<ApiResponse<PageResponse<ParticipationResponse>>> getParticipants(
|
||||||
@Parameter(description = "이벤트 ID", example = "evt_20250124_001")
|
@Parameter(description = "이벤트 ID", example = "evt_20250124_001")
|
||||||
@PathVariable String eventId,
|
@PathVariable String eventId,
|
||||||
@ -90,10 +88,9 @@ public class ParticipationController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 참여자 상세 조회
|
* 참여자 상세 조회
|
||||||
* GET /participations/{eventId}/participants/{participantId}
|
* GET /events/{eventId}/participants/{participantId}
|
||||||
* GET /events/{eventId}/participants/{participantId} (프론트엔드 호환)
|
|
||||||
*/
|
*/
|
||||||
@GetMapping({"/participations/{eventId}/participants/{participantId}", "/events/{eventId}/participants/{participantId}"})
|
@GetMapping({"/events/{eventId}/participants/{participantId}"})
|
||||||
public ResponseEntity<ApiResponse<ParticipationResponse>> getParticipant(
|
public ResponseEntity<ApiResponse<ParticipationResponse>> getParticipant(
|
||||||
@PathVariable String eventId,
|
@PathVariable String eventId,
|
||||||
@PathVariable String participantId) {
|
@PathVariable String participantId) {
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@CrossOrigin(origins = "http://localhost:3000")
|
@CrossOrigin(origins = "http://localhost:3000")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/v1")
|
@RequestMapping
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class WinnerController {
|
public class WinnerController {
|
||||||
|
|
||||||
@ -35,9 +35,9 @@ public class WinnerController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 당첨자 추첨
|
* 당첨자 추첨
|
||||||
* POST /participations/{eventId}/draw-winners
|
* POST /events/{eventId}/draw-winners
|
||||||
*/
|
*/
|
||||||
@PostMapping("/participations/{eventId}/draw-winners")
|
@PostMapping("/events/{eventId}/draw-winners")
|
||||||
public ResponseEntity<ApiResponse<DrawWinnersResponse>> drawWinners(
|
public ResponseEntity<ApiResponse<DrawWinnersResponse>> drawWinners(
|
||||||
@PathVariable String eventId,
|
@PathVariable String eventId,
|
||||||
@Valid @RequestBody DrawWinnersRequest request) {
|
@Valid @RequestBody DrawWinnersRequest request) {
|
||||||
@ -57,7 +57,7 @@ public class WinnerController {
|
|||||||
description = "이벤트의 당첨자 목록을 페이징하여 조회합니다. " +
|
description = "이벤트의 당첨자 목록을 페이징하여 조회합니다. " +
|
||||||
"정렬 가능한 필드: winnerRank(기본값), wonAt, participantId, name, phoneNumber, bonusEntries"
|
"정렬 가능한 필드: winnerRank(기본값), wonAt, participantId, name, phoneNumber, bonusEntries"
|
||||||
)
|
)
|
||||||
@GetMapping("/participations/{eventId}/winners")
|
@GetMapping("/events/{eventId}/winners")
|
||||||
public ResponseEntity<ApiResponse<PageResponse<ParticipationResponse>>> getWinners(
|
public ResponseEntity<ApiResponse<PageResponse<ParticipationResponse>>> getWinners(
|
||||||
@Parameter(description = "이벤트 ID", example = "evt_20250124_001")
|
@Parameter(description = "이벤트 ID", example = "evt_20250124_001")
|
||||||
@PathVariable String eventId,
|
@PathVariable String eventId,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user