-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: 폴더 구조 변경 * fix: 의존성 문제 해결 * refactor: 카테고리 swagger 분리 * refactor: Group swagger 분리 * refactor: Group Pray swagger 분리 * refactor: History Swagger 분리 * refactor: Member Swagger 분리 * refactor: Pray Swagger 분리 * refactor: Share Swagger 분리 * chore: initDB 해제
- Loading branch information
Showing
15 changed files
with
622 additions
and
342 deletions.
There are no files selected for viewing
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
77 changes: 77 additions & 0 deletions
77
src/main/java/com/uspray/uspray/domain/category/controller/CategoryApi.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,77 @@ | ||
package com.uspray.uspray.domain.category.controller; | ||
|
||
import com.uspray.uspray.domain.category.dto.CategoryRequestDto; | ||
import com.uspray.uspray.domain.category.dto.CategoryResponseDto; | ||
import com.uspray.uspray.global.common.dto.ApiResponseDto; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import java.util.List; | ||
import org.springframework.security.core.userdetails.User; | ||
|
||
@Tag(name = "Category", description = "Category 관련 API") | ||
@SecurityRequirement(name = "JWT Auth") | ||
public interface CategoryApi { | ||
|
||
@Operation(summary = "카테고리 조회") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "카테고리 조회", | ||
content = @Content(schema = @Schema(implementation = CategoryResponseDto.class))) | ||
ApiResponseDto<CategoryResponseDto> getCategory( | ||
@Parameter(hidden = true) User user, | ||
@Parameter(description = "카테고리 ID", required = true) Long categoryId | ||
); | ||
|
||
@Operation(summary = "카테고리 목록 조회") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "카테고리 목록 조회", | ||
content = @Content(schema = @Schema(implementation = CategoryResponseDto.class))) | ||
ApiResponseDto<List<CategoryResponseDto>> getCategoryList( | ||
@Parameter(hidden = true) User user, | ||
@Parameter(description = "카테고리 종류(personal, shared)", required = true, example = "personal") String categoryType | ||
); | ||
|
||
@Operation(summary = "카테고리 생성") | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "카테고리 생성", | ||
content = @Content(schema = @Schema(implementation = CategoryResponseDto.class))) | ||
ApiResponseDto<CategoryResponseDto> createCategory( | ||
@Parameter(hidden = true) User user, | ||
CategoryRequestDto categoryRequestDto | ||
); | ||
|
||
ApiResponseDto<CategoryResponseDto> deleteCategory( | ||
@Parameter(hidden = true) User user, | ||
@Parameter(description = "카테고리 ID", required = true) Long categoryId | ||
); | ||
|
||
@Operation(summary = "카테고리 수정") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "카테고리 수정", | ||
content = @Content(schema = @Schema(implementation = CategoryResponseDto.class))) | ||
ApiResponseDto<CategoryResponseDto> updatePray( | ||
@Parameter(description = "카테고리 ID", required = true) Long categoryId, | ||
CategoryRequestDto categoryRequestDto, | ||
@Parameter(hidden = true) User user | ||
); | ||
|
||
@Operation(summary = "카테고리 순서 수정") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "카테고리 순서 수정", | ||
content = @Content(schema = @Schema(implementation = CategoryResponseDto.class))) | ||
ApiResponseDto<CategoryResponseDto> updatePrayOrder( | ||
@Parameter(description = "카테고리 ID", required = true) Long categoryId, | ||
@Parameter(description = "카테고리 순서", required = true) int index, | ||
@Parameter(hidden = true) User user | ||
); | ||
|
||
} |
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
118 changes: 118 additions & 0 deletions
118
src/main/java/com/uspray/uspray/domain/group/controller/GroupApi.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,118 @@ | ||
package com.uspray.uspray.domain.group.controller; | ||
|
||
import com.uspray.uspray.domain.group.dto.group.request.GroupMemberRequestDto; | ||
import com.uspray.uspray.domain.group.dto.group.request.GroupRequestDto; | ||
import com.uspray.uspray.domain.group.dto.group.response.GroupListResponseDto; | ||
import com.uspray.uspray.domain.group.dto.group.response.GroupMemberResponseDto; | ||
import com.uspray.uspray.global.common.dto.ApiResponseDto; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import java.util.List; | ||
import org.springframework.security.core.annotation.AuthenticationPrincipal; | ||
import org.springframework.security.core.userdetails.User; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
|
||
public interface GroupApi { | ||
|
||
@Operation(summary = "모임 목록 조회") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "사용자가 가입한 목록 조회", | ||
content = @Content(schema = @Schema(implementation = GroupListResponseDto.class)) | ||
) | ||
ApiResponseDto<GroupListResponseDto> getGroupList(@Parameter(hidden = true) User user); | ||
|
||
@Operation(summary = "모임 생성") | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "신규로 모임을 생성합니다", | ||
content = @Content(schema = @Schema(implementation = GroupRequestDto.class)) | ||
) | ||
ApiResponseDto<?> createGroup( | ||
@Parameter(hidden = true) User user, | ||
GroupRequestDto groupRequestDto | ||
); | ||
|
||
@Operation(summary = "[모임 리더] 모임 이름을 변경합니다") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "모임 이름 변경", | ||
content = @Content(schema = @Schema(implementation = GroupRequestDto.class)) | ||
) | ||
ApiResponseDto<?> changeGroupName( | ||
@Parameter(hidden = true) User user, | ||
Long groupId, | ||
GroupRequestDto groupRequestDto); | ||
|
||
@Operation(summary = "[모임 리더] 모임 리더를 위임합니다") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "모임 리더 위임", | ||
content = @Content(schema = @Schema(implementation = GroupMemberRequestDto.class)) | ||
) | ||
ApiResponseDto<?> changeGroupLeader( | ||
@Parameter(hidden = true) User user, | ||
Long groupId, | ||
GroupMemberRequestDto groupLeaderRequestDto); | ||
|
||
@Operation(summary = "[모임 리더] 회원 내보내기") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "모임 회원을 내보냅니다", | ||
content = @Content(schema = @Schema(implementation = GroupMemberRequestDto.class)) | ||
) | ||
ApiResponseDto<?> kickGroupMember( | ||
@Parameter(hidden = true) User user, | ||
Long groupId, | ||
GroupMemberRequestDto groupMemberRequestDto); | ||
|
||
@Operation(summary = "모임 가입하기") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "모임에 가입합니다" | ||
) | ||
ApiResponseDto<?> addGroupMember( | ||
@Parameter(hidden = true) User user, | ||
Long groupId); | ||
|
||
@Operation(summary = "모임 탈퇴하기") | ||
@ApiResponse( | ||
responseCode = "204", | ||
description = "모임을 떠납니다", | ||
content = @Content(schema = @Schema(implementation = GroupMemberRequestDto.class)) | ||
) | ||
ApiResponseDto<?> leaveGroup( | ||
@Parameter(hidden = true) User user, | ||
Long groupId); | ||
|
||
@Operation(summary = "[모임 리더] 모임 삭제하기") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "모임을 삭제합니다. 모임 회원, 모임 기도제목 등 일괄 삭제" | ||
) | ||
ApiResponseDto<?> deleteGroup( | ||
@Parameter(hidden = true) @AuthenticationPrincipal User user, | ||
@PathVariable Long groupId); | ||
|
||
@Operation(summary = "회원 검색") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "모임 내 회원 목록을 조회합니다" | ||
) | ||
ApiResponseDto<List<GroupMemberResponseDto>> searchGroupMembers( | ||
Long groupId, | ||
@Parameter(hidden = true) User user, | ||
String name); | ||
|
||
@Operation(summary = "그룹 알림 설정") | ||
@ApiResponse( | ||
responseCode = "200", | ||
description = "그룹 알림 설정을 변경합니다" | ||
) | ||
ApiResponseDto<?> changeGroupNotification( | ||
@Parameter(hidden = true) User user, | ||
Long groupId); | ||
} |
Oops, something went wrong.