Skip to content
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
2 changes: 1 addition & 1 deletion src/main/java/com/dokdok/topic/api/PreOpinionApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public interface PreOpinionApi {
content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
schema = @Schema(implementation = PreOpinionResponse.class),
examples = @ExampleObject(value = """
{"code":"SUCCESS","message":"약속의 사전 의견 목록 조회를 성공했습니다.","data":{"topics":[{"topicId":1,"topicName":"책의 주요 메시지","topicDescription":"이 책에서 전달하고자 하는 핵심 메시지는 무엇인가요?","topicType":"토론","confirmOrder":1}],"members":[{"memberInfo":{"memberId":1,"nickname":"독서왕","profileImage":"https://example.com/profile.jpg"},"bookReview":{"rating":4.5,"bookKeywords":["성장","관계"],"impressionKeywords":["여운이 남는","즐거운"]},"topicOpinions":[{"topicId":1,"content":"저는 이 책의 핵심 메시지가 자기 성찰이라고 생각합니다."}]}]}}
{"code":"SUCCESS","message":"약속의 사전 의견 목록 조회를 성공했습니다.","data":{"topics":[{"topicId":1,"title":"책의 주요 메시지","description":"이 책에서 전달하고자 하는 핵심 메시지는 무엇인가요?","topicType":"DISCUSSION","topicTypeLabel":"DISCUSSION","confirmOrder":1}],"members":[{"memberInfo":{"memberId":1,"nickname":"독서왕","profileImage":"https://example.com/profile.jpg"},"bookReview":{"rating":4.5,"bookKeywords":["성장","관계"],"impressionKeywords":["여운이 남는","즐거운"]},"topicOpinions":[{"topicId":1,"content":"저는 이 책의 핵심 메시지가 자기 성찰이라고 생각합니다."}]}]}}
"""))
),
@io.swagger.v3.oas.annotations.responses.ApiResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.dokdok.topic.entity.Topic;
import com.dokdok.topic.entity.TopicAnswer;
import com.dokdok.topic.entity.TopicType;
import io.swagger.v3.oas.annotations.media.Schema;

import java.math.BigDecimal;
Expand All @@ -22,13 +23,17 @@ public record TopicInfo(
Long topicId,

@Schema(description = "주제명", example = "책의 주요 메시지")
String topicName,
String title,

@Schema(description = "주제 설명", example = "이 책에서 전달하고자 하는 핵심 메시지는 무엇인가요?")
String topicDescription,
String description,

@Schema(description = "주제 타입", example = "토론")
String topicType,
@Schema(description = "주제 타입", example = "DISCUSSION",
allowableValues = {"FREE", "DISCUSSION", "EMOTION", "EXPERIENCE", "CHARACTER_ANALYSIS", "COMPARISON", "STRUCTURE", "IN_DEPTH", "CREATIVE", "CUSTOM"})
TopicType topicType,

@Schema(description = "주제 타입 라벨", example = "토론형")
String topicTypeLabel,

@Schema(description = "주제 순서", example = "1")
Integer confirmOrder
Expand All @@ -38,6 +43,7 @@ public static TopicInfo from(Topic topic) {
topic.getId(),
topic.getTitle(),
topic.getDescription(),
topic.getTopicType(),
topic.getTopicType().getDisplayName(),
topic.getConfirmOrder()
);
Expand Down