From eb52fb1843991fa5bab2458cf92c48eab90483b5 Mon Sep 17 00:00:00 2001 From: thezz9 Date: Thu, 10 Jul 2025 19:02:19 +0900 Subject: [PATCH] refactor: include problemTitle in response DTO --- .../dto/response/submission/GroupedSubmissionResponse.java | 6 +++++- .../infrastructure/swagger/config/SwaggerConfig.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ezcode/codetest/application/submission/dto/response/submission/GroupedSubmissionResponse.java b/src/main/java/org/ezcode/codetest/application/submission/dto/response/submission/GroupedSubmissionResponse.java index f8acdb2a..7515bdea 100644 --- a/src/main/java/org/ezcode/codetest/application/submission/dto/response/submission/GroupedSubmissionResponse.java +++ b/src/main/java/org/ezcode/codetest/application/submission/dto/response/submission/GroupedSubmissionResponse.java @@ -13,13 +13,16 @@ import lombok.Getter; @Getter -@JsonPropertyOrder({"problemId", "problemDescription", "submissions"}) +@JsonPropertyOrder({"problemId", "problemTitle", "problemDescription", "submissions"}) @Schema(description = "문제 단위로 묶은 제출 목록 응답") public class GroupedSubmissionResponse { @Schema(description = "문제 ID", example = "10") private final Long problemId; + @Schema(description = "문제 제목", example = "A + B") + private final String problemTitle; + @Schema(description = "문제 설명", example = "두 수의 합을 구하는 문제입니다.") private final String problemDescription; @@ -45,6 +48,7 @@ private static GroupedSubmissionResponse createSorted(Problem problem, List submissions) { this.problemId = problem.getId(); + this.problemTitle = problem.getTitle(); this.problemDescription = problem.getDescription(); this.submissions = submissions.stream() .map(SubmissionDetailResponse::from) diff --git a/src/main/java/org/ezcode/codetest/infrastructure/swagger/config/SwaggerConfig.java b/src/main/java/org/ezcode/codetest/infrastructure/swagger/config/SwaggerConfig.java index 5338c1e8..b2b8f674 100644 --- a/src/main/java/org/ezcode/codetest/infrastructure/swagger/config/SwaggerConfig.java +++ b/src/main/java/org/ezcode/codetest/infrastructure/swagger/config/SwaggerConfig.java @@ -14,7 +14,7 @@ @OpenAPIDefinition( servers = { @Server( - url = "https://ezcode.my", // ← 슬래시 없이 호스트만! + url = "http://localhost:8080", // ← 슬래시 없이 호스트만! description = "Production server" ) },