Skip to content

Commit be99694

Browse files
authored
refactor: include problemTitle in response DTO (#166)
1 parent 722d2d0 commit be99694

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/java/org/ezcode/codetest/application/submission/dto/response/submission/GroupedSubmissionResponse.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313
import lombok.Getter;
1414

1515
@Getter
16-
@JsonPropertyOrder({"problemId", "problemDescription", "submissions"})
16+
@JsonPropertyOrder({"problemId", "problemTitle", "problemDescription", "submissions"})
1717
@Schema(description = "문제 단위로 묶은 제출 목록 응답")
1818
public class GroupedSubmissionResponse {
1919

2020
@Schema(description = "문제 ID", example = "10")
2121
private final Long problemId;
2222

23+
@Schema(description = "문제 제목", example = "A + B")
24+
private final String problemTitle;
25+
2326
@Schema(description = "문제 설명", example = "두 수의 합을 구하는 문제입니다.")
2427
private final String problemDescription;
2528

@@ -45,6 +48,7 @@ private static GroupedSubmissionResponse createSorted(Problem problem, List<Subm
4548

4649
private GroupedSubmissionResponse(Problem problem, List<Submission> submissions) {
4750
this.problemId = problem.getId();
51+
this.problemTitle = problem.getTitle();
4852
this.problemDescription = problem.getDescription();
4953
this.submissions = submissions.stream()
5054
.map(SubmissionDetailResponse::from)

src/main/java/org/ezcode/codetest/infrastructure/swagger/config/SwaggerConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@OpenAPIDefinition(
1515
servers = {
1616
@Server(
17-
url = "https://ezcode.my", // ← 슬래시 없이 호스트만!
17+
url = "http://localhost:8080", // ← 슬래시 없이 호스트만!
1818
description = "Production server"
1919
)
2020
},

0 commit comments

Comments
 (0)