-
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.
Merge pull request #94 from TeamPINGLE/feat/80
[feat] 마이핑글 리스트 api 생성
- Loading branch information
Showing
17 changed files
with
209 additions
and
20 deletions.
There are no files selected for viewing
13 changes: 12 additions & 1 deletion
13
src/main/java/org/pingle/pingleserver/config/SwaggerConfig.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
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
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
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
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
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
30 changes: 30 additions & 0 deletions
30
src/main/java/org/pingle/pingleserver/controller/swagger/AuthApi.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,30 @@ | ||
package org.pingle.pingleserver.controller.swagger; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotNull; | ||
import org.pingle.pingleserver.annotation.UserId; | ||
import org.pingle.pingleserver.constant.Constants; | ||
import org.pingle.pingleserver.dto.common.ApiResponse; | ||
import org.pingle.pingleserver.dto.request.LoginRequest; | ||
import org.pingle.pingleserver.dto.response.JwtTokenResponse; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
|
||
@Tag(name = "Auth", description = "유저 인증 관련 API") | ||
public interface AuthApi { | ||
|
||
@Operation(summary = "로그인", description = "로그인한다.") | ||
ApiResponse<JwtTokenResponse> login( | ||
@NotNull @RequestHeader(Constants.PROVIDER_TOKEN_HEADER) String providerToken, | ||
@Valid @RequestBody LoginRequest request); | ||
|
||
@Operation(summary = "토큰 재발급", description = "토큰을 재발급한다.") | ||
ApiResponse<JwtTokenResponse> reissue( | ||
@NotNull @RequestHeader(Constants.AUTHORIZATION_HEADER) String refreshToken); | ||
|
||
@Operation(summary = "로그아웃", description = "로그아웃한다.") | ||
ApiResponse<?> logout(Long userId); | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/org/pingle/pingleserver/controller/swagger/MeetingApi.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,30 @@ | ||
package org.pingle.pingleserver.controller.swagger; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
import org.pingle.pingleserver.annotation.GUserId; | ||
import org.pingle.pingleserver.constant.Constants; | ||
import org.pingle.pingleserver.dto.common.ApiResponse; | ||
import org.pingle.pingleserver.dto.request.MeetingRequest; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
|
||
@Tag(name = "Meeting", description = "번개 API") | ||
public interface MeetingApi { | ||
|
||
@Operation(summary = "번개 생성", description = "번개를 생성한다.") | ||
ApiResponse<?> createMeeting(@Valid @RequestBody MeetingRequest request, @GUserId Long userId, | ||
@RequestHeader(Constants.TEAM_ID) Long groupId); | ||
@Operation(summary = "번개 참여", description = "번개에 참여한다.") | ||
ApiResponse<?> participateMeeting (@GUserId Long userId, Long meetingId); | ||
|
||
@Operation(summary = "번개 취소", description = "번개 참여를 취소한다.") | ||
ApiResponse<?> cancelMeeting (@GUserId Long userId, Long meetingId); | ||
|
||
@Operation(summary = "번개 참여자 조회", description = "번개 참여자를 조회한다.") | ||
ApiResponse<?> getMeetingParticipants (Long meetingId); | ||
|
||
@Operation(summary = "번개 삭제", description = "번개를 삭제한다.") | ||
ApiResponse<?> deleteMeeting(@GUserId Long userId, Long meetingId); | ||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/org/pingle/pingleserver/controller/swagger/OpenApi.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,16 @@ | ||
package org.pingle.pingleserver.controller.swagger; | ||
|
||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.pingle.pingleserver.dto.common.ApiResponse; | ||
import org.pingle.pingleserver.dto.reponse.LocationResponse; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import java.util.List; | ||
|
||
@Tag(name = "외부 API", description = "외부(네이버) API") | ||
public interface OpenApi { | ||
@Operation(summary = "지역 정보 검색", description = "네이버 API를 이용해 지역 정보를 조회한다.") | ||
ApiResponse<List<LocationResponse>> getLocationInfo(@RequestParam(name = "search") String location); | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/org/pingle/pingleserver/controller/swagger/PinApi.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,27 @@ | ||
package org.pingle.pingleserver.controller.swagger; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.annotation.Nullable; | ||
import org.pingle.pingleserver.annotation.UserId; | ||
import org.pingle.pingleserver.domain.enums.MCategory; | ||
import org.pingle.pingleserver.dto.common.ApiResponse; | ||
import org.pingle.pingleserver.dto.reponse.MeetingResponse; | ||
import org.pingle.pingleserver.dto.reponse.PinResponse; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import java.util.List; | ||
|
||
@Tag(name = "Pin", description = "핀 API") | ||
public interface PinApi { | ||
|
||
@Operation(summary = "핀 목록 조회", description = "핀 목록을 조회한다.") | ||
ApiResponse<List<PinResponse>> getPins(Long teamId, MCategory category); | ||
|
||
@Operation(summary = "핀에 속한 미팅 목록 조회", description = "핀에 속한 미팅 목록을 조회한다.") | ||
ApiResponse<List<MeetingResponse>> getMeetings(@UserId Long userId, | ||
@PathVariable String teamId, | ||
@PathVariable Long pinId, | ||
@Nullable @RequestParam MCategory category); | ||
} |
33 changes: 33 additions & 0 deletions
33
src/main/java/org/pingle/pingleserver/controller/swagger/TeamApi.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,33 @@ | ||
package org.pingle.pingleserver.controller.swagger; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.Valid; | ||
import jakarta.validation.constraints.NotBlank; | ||
import org.pingle.pingleserver.annotation.UserId; | ||
import org.pingle.pingleserver.dto.common.ApiResponse; | ||
import org.pingle.pingleserver.dto.request.TeamRegisterRequest; | ||
import org.pingle.pingleserver.dto.response.SelectedTeamResponse; | ||
import org.pingle.pingleserver.dto.response.TeamRegisterResponse; | ||
import org.pingle.pingleserver.dto.response.TeamSearchResultResponse; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import java.util.List; | ||
|
||
@Tag(name = "Team", description = "팀 관련 API") | ||
public interface TeamApi { | ||
@Operation(summary = "팀 검색") | ||
ApiResponse<List<TeamSearchResultResponse>> searchTeams(@NotBlank @RequestParam String name); | ||
|
||
@Operation(summary = "팀 조회") | ||
ApiResponse<SelectedTeamResponse> getTeam(@PathVariable Long teamId); | ||
|
||
@Operation(summary = "팀 가입") | ||
ApiResponse<TeamRegisterResponse> registerTeam( | ||
@UserId Long userId, | ||
@PathVariable Long teamId, | ||
@Valid @RequestBody TeamRegisterRequest request); | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/org/pingle/pingleserver/controller/swagger/UserApi.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,30 @@ | ||
package org.pingle.pingleserver.controller.swagger; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.validation.constraints.NotNull; | ||
import org.pingle.pingleserver.annotation.GUserId; | ||
import org.pingle.pingleserver.annotation.UserId; | ||
import org.pingle.pingleserver.constant.Constants; | ||
import org.pingle.pingleserver.dto.common.ApiResponse; | ||
import org.pingle.pingleserver.dto.response.MyPingleResponse; | ||
import org.pingle.pingleserver.dto.response.UserInfoResponse; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import java.util.List; | ||
|
||
@Tag(name = "User", description = "사용자 정보") | ||
public interface UserApi { | ||
|
||
@Operation(summary = "로그인한 사용자 정보 조회") | ||
ApiResponse<UserInfoResponse> getLoginUserInfo(@UserId Long userId); | ||
|
||
@Operation(summary = "내가 참여한 미팅 조회") | ||
ApiResponse<List<MyPingleResponse>> getMyPingles ( | ||
@GUserId Long userId, @NotNull @RequestParam boolean participation, | ||
@RequestHeader(Constants.TEAM_ID)Long teamId); | ||
|
||
@Operation(summary = "회원 탈퇴") | ||
ApiResponse<Void> leave(@UserId Long userId, @RequestHeader(Constants.APPLE_LOGOUT_HEADER) String code); | ||
} |
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