-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from tukcomCD2024/Dev-backend
Dev backend
- Loading branch information
Showing
10 changed files
with
235 additions
and
17 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
backend/core/src/main/java/com/rollthedice/backend/domain/bookmark/api/BookmarkApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package com.rollthedice.backend.domain.bookmark.api; | ||
|
||
import com.rollthedice.backend.domain.news.dto.response.NewsResponse; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.enums.ParameterIn; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import org.springframework.data.domain.Pageable; | ||
|
||
import java.util.List; | ||
|
||
public interface BookmarkApi { | ||
@Operation( | ||
summary = "북마크 조회", | ||
description = "회원이 북마크한 뉴스를 페이지로 나누어 조회합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"bookmark"} | ||
) | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "OK" | ||
) | ||
List<NewsResponse> getBookmarked( | ||
Pageable pageable | ||
); | ||
|
||
@Operation( | ||
summary = "북마크 저장", | ||
description = "뉴스에 대하여 북마크로 저장합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"bookmark"} | ||
) | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "Created" | ||
) | ||
void saveBookmark( | ||
@Parameter(in = ParameterIn.PATH, description = "뉴스 ID", required = true) | ||
Long newsId | ||
); | ||
|
||
@Operation( | ||
summary = "북마크 삭제", | ||
description = "저장된 북마크를 해제합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"bookmark"} | ||
) | ||
@ApiResponse( | ||
responseCode = "204", | ||
description = "No Content" | ||
) | ||
void deleteBookmark( | ||
@Parameter(in = ParameterIn.PATH, description = "뉴스 ID", required = true) | ||
Long newsId | ||
); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 109 additions & 0 deletions
109
backend/core/src/main/java/com/rollthedice/backend/domain/debate/api/DebateApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
package com.rollthedice.backend.domain.debate.api; | ||
|
||
import com.rollthedice.backend.domain.debate.dto.request.DebateMessageRequest; | ||
import com.rollthedice.backend.domain.debate.dto.request.DebateRoomRequest; | ||
import com.rollthedice.backend.domain.debate.dto.response.DebateMessageResponse; | ||
import com.rollthedice.backend.domain.debate.dto.response.DebateRoomResponse; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.enums.ParameterIn; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
import java.util.List; | ||
|
||
|
||
public interface DebateApi { | ||
|
||
@Operation( | ||
summary = "토론방 생성", | ||
description = "주제가 선택된 토론방을 생성합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"debate_room"} | ||
) | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "Created" | ||
) | ||
void saveDebateRoom(@RequestBody DebateRoomRequest request); | ||
|
||
@Operation( | ||
summary = "토론방 전체 조회", | ||
description = "회원의 토론방을 페이지로 나누어 조회합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"debate_room"} | ||
) | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "OK" | ||
) | ||
List<DebateRoomResponse> getDebateRooms(Pageable pageable); | ||
|
||
@Operation( | ||
summary = "토론방 삭제", | ||
description = "토론방을 삭제합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"debate_room"} | ||
) | ||
@ApiResponse( | ||
responseCode = "204", | ||
description = "No Content" | ||
) | ||
void deleteDebateRoom(@Parameter(in = ParameterIn.PATH, description = "토론방 ID", required = true) | ||
Long roomId | ||
); | ||
|
||
@Operation( | ||
summary = "[인간] 토론 메세지 저장", | ||
description = "사용자가 보낸 토론 메세지를 저장합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"debate_message"} | ||
) | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "Created" | ||
) | ||
void saveHumanDebateMessage( | ||
@Parameter(in = ParameterIn.PATH, description = "토론방 ID", required = true) | ||
Long roomId, | ||
|
||
@RequestBody DebateMessageRequest request | ||
); | ||
|
||
@Operation( | ||
summary = "[AI] 토론 메세지 저장", | ||
description = "ChatGPT OPENAI가 보낸 토론 메세지를 저장합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"debate_message"} | ||
) | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "Created" | ||
) | ||
void saveAIDebateMessage( | ||
@Parameter(in = ParameterIn.PATH, description = "토론방 ID", required = true) | ||
Long roomId, | ||
|
||
@RequestBody DebateMessageRequest request | ||
); | ||
|
||
@Operation( | ||
summary = "토론 메세지 조회", | ||
description = "토론방의 토론 메세지 이력을 조회합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"debate_message"} | ||
) | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "OK" | ||
) | ||
List<DebateMessageResponse> getDebateMessages( | ||
@Parameter(in = ParameterIn.PATH, description = "토론방 ID", required = true) | ||
Long roomId | ||
); | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
backend/core/src/main/java/com/rollthedice/backend/domain/member/api/MemberApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.rollthedice.backend.domain.member.api; | ||
|
||
import com.rollthedice.backend.domain.member.dto.response.MemberResponse; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
|
||
public interface MemberApi { | ||
@Operation( | ||
summary = "회원 정보 조회", | ||
description = "회원 정보를 조회합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"member"} | ||
) | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "OK" | ||
) | ||
MemberResponse getMemberInfo(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
backend/core/src/main/java/com/rollthedice/backend/domain/news/api/NewsApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.rollthedice.backend.domain.news.api; | ||
|
||
import com.rollthedice.backend.domain.news.dto.response.NewsResponse; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import org.springframework.data.domain.Pageable; | ||
|
||
import java.util.List; | ||
|
||
public interface NewsApi { | ||
@Operation( | ||
summary = "요약 뉴스 조회", | ||
description = "요약 뉴스를 페이지로 나누어 조회합니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"news"} | ||
) | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "OK" | ||
) | ||
List<NewsResponse> getNews(Pageable pageable); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.