Skip to content

Commit c51f7e9

Browse files
authored
Merge pull request #481 from TaskFlow-CLAP/CLAP-378
CLAP-378 카테고리 조회 API Id 변수명 수정
2 parents cf951aa + 71d1062 commit c51f7e9

File tree

4 files changed

+32
-5
lines changed

4 files changed

+32
-5
lines changed
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
package clap.server.adapter.inbound.web.dto.admin.response;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
4+
35
import java.util.List;
46

57
public record FindAllCategoryResponse(
6-
Long id,
8+
@Schema(description = "메인 카테고리 ID", example = "1")
9+
Long mainCategoryId,
10+
11+
@Schema(description = "카테고리 이름", example = "VM 관련")
712
String name,
13+
14+
@Schema(description = "카테고리 코드", example = "VM")
815
String code,
16+
17+
@Schema(description = "서브 카테고리 목록")
918
List<FindSubCategoryResponse> subCategory
1019
) {
1120
}
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
package clap.server.adapter.inbound.web.dto.admin.response;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
4+
35
public record FindMainCategoryResponse(
4-
Long id,
6+
@Schema(description = "메인 카테고리 ID", example = "1")
7+
Long mainCategoryId,
8+
9+
@Schema(description = "카테고리 이름", example = "VM 관련")
510
String name,
11+
12+
@Schema(description = "카테고리 코드", example = "VM")
613
String code
714
) {
815
}
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
package clap.server.adapter.inbound.web.dto.admin.response;
22

3+
import io.swagger.v3.oas.annotations.media.Schema;
4+
35
public record FindSubCategoryResponse(
4-
Long id,
6+
@Schema(description = "서브 카테고리 ID", example = "4")
7+
Long subCategoryId,
8+
9+
@Schema(description = "메인 카테고리 ID", example = "1")
510
Long mainCategoryId,
11+
12+
@Schema(description = "카테고리 이름", example = "VM 수정")
613
String name,
14+
15+
@Schema(description = "카테고리 코드", example = "VU")
716
String code,
17+
18+
@Schema(description = "카테고리 설명 예시", example = "VM을 수정합니다.")
819
String descriptionExample
920
) {
1021
}

src/main/java/clap/server/application/mapper/response/CategoryResponseMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ public class CategoryResponseMapper {
1111
private CategoryResponseMapper() {throw new IllegalStateException("Utility class");}
1212

1313
public static FindAllCategoryResponse toFindAllCategoryResponse(
14-
Long id,
14+
Long mainCategoryId,
1515
String name,
1616
String code,
1717
List<FindSubCategoryResponse> subCategoryResponses) {
18-
return new FindAllCategoryResponse(id, name, code, subCategoryResponses);
18+
return new FindAllCategoryResponse(mainCategoryId, name, code, subCategoryResponses);
1919
}
2020

2121
public static FindMainCategoryResponse toFindMainCategoryResponse(Category category) {

0 commit comments

Comments
 (0)