Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor(#14) : swagger 수정, 패키지 이름 수정 #16

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.urdego.urdego_game_service.common.client.content;
package io.urdego.urdego_game_service.controller.client.content;

import io.urdego.urdego_game_service.common.client.content.dto.ContentRes;
import io.urdego.urdego_game_service.controller.client.content.dto.ContentRes;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.urdego.urdego_game_service.common.client.content.dto;
package io.urdego.urdego_game_service.controller.client.content.dto;

public record ContentRes(
Long contentId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.urdego.urdego_game_service.common.client.user;
package io.urdego.urdego_game_service.controller.client.user;

import org.springframework.cloud.openfeign.FeignClient;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ public ResponseEntity<GameCreateRes> startGame(@RequestBody GameCreateReq reques
return new ResponseEntity<>(response, HttpStatus.CREATED);
}

@Tag(name = "게임 Socket")
@Tag(name = "백엔드 API")
@Operation(summary = "게임 점수", description = "게임 점수 조회")
@PostMapping("/score")
public ResponseEntity<ScoreRes> giveScores(@RequestBody ScoreReq request) {
ScoreRes response = gameService.giveScores(request);
return new ResponseEntity<>(response, HttpStatus.OK);
}

@Tag(name = "게임 Socket")
@Tag(name = "백엔드 API")
@Operation(summary = "게임 종료", description = "게임 종료")
@PostMapping("/end")
public ResponseEntity<GameEndRes> endGame(@RequestBody String gameId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,31 @@ public ResponseEntity<List<RoomInfoRes>> viewRooms() {
return new ResponseEntity<>(response, HttpStatus.OK);
}

@Tag(name = "대기방 Socket")
@Operation(summary = "플레이어 초대", description = "대기방에 플레이어 참여")
@Tag(name = "백엔드 API")
@Operation(summary = "플레이어 초대", description = "대기방 플레이어 참여")
@PostMapping("/player/invite")
public ResponseEntity<RoomPlayersRes> invitePlayer(@RequestBody PlayerReq request) {
RoomPlayersRes response = roomService.joinRoom(request);
return new ResponseEntity<>(response, HttpStatus.OK);
}

@Tag(name = "대기방 Socket")
@Operation(summary = "플레이어 삭제", description = "대기방에 플레이어 삭제")
@Tag(name = "백엔드 API")
@Operation(summary = "플레이어 삭제", description = "대기방 플레이어 삭제")
@PostMapping("/player/remove")
public ResponseEntity<RoomPlayersRes> removePlayer(@RequestBody PlayerReq request) {
RoomPlayersRes response = roomService.removePlayer(request);
return new ResponseEntity<>(response, HttpStatus.OK);
}

@Tag(name = "대기방 Socket")
@Tag(name = "백엔드 API")
@Operation(summary = "플레이어 준비", description = "대기방 플레이어 준비 상태 관리")
@PostMapping("/player/ready")
public ResponseEntity<RoomPlayersRes> readyPlayer(@RequestBody PlayerReq request) {
RoomPlayersRes response = roomService.readyPlayer(request);
return new ResponseEntity<>(response, HttpStatus.OK);
}

@Tag(name = "백엔드 API")
@Operation(summary = "게임 컨텐츠 선택", description = "게임 문제 출제를 위한 컨텐츠 선택")
@PostMapping("/select-content")
public ResponseEntity<Void> selectContent(@RequestBody ContentSelectReq request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ public class RoundController {

private final RoundService roundService;

@Tag(name = "게임 라운드 Socket")
@Tag(name = "백엔드 API")
@Operation(summary = "문제 출제", description = "라운드 시작")
@PostMapping("/question")
public ResponseEntity<QuestionRes> giveQuestion(@RequestBody QuestionReq request) {
QuestionRes response = roundService.getQuestion(request);
return ResponseEntity.ok(response);
}

@Tag(name = "게임 라운드 Socket")
@Tag(name = "백엔드 API")
@Operation(summary = "답안 제출", description = "사용자별 답안 제출")
@PostMapping("/answer")
public ResponseEntity<AnswerRes> submitAnswer(@RequestBody AnswerReq request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import io.urdego.urdego_game_service.controller.round.dto.request.QuestionReq;
import io.urdego.urdego_game_service.controller.round.dto.response.AnswerRes;
import io.urdego.urdego_game_service.controller.round.dto.response.QuestionRes;
import io.urdego.urdego_game_service.common.client.content.ContentServiceClient;
import io.urdego.urdego_game_service.common.client.content.dto.ContentRes;
import io.urdego.urdego_game_service.controller.client.content.ContentServiceClient;
import io.urdego.urdego_game_service.controller.client.content.dto.ContentRes;
import io.urdego.urdego_game_service.common.exception.ExceptionMessage;
import io.urdego.urdego_game_service.common.exception.round.QuestionException;
import io.urdego.urdego_game_service.domain.room.entity.Room;
Expand Down