From 30b84709dae6beef536ca5905309eb40254c410a Mon Sep 17 00:00:00 2001 From: nohy6630 Date: Mon, 1 Apr 2024 21:23:33 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20Swagger=EC=97=90=20=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EB=B2=84=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 2 +- .../swagger/SwaggerDocumentController.java | 36 +++++++++---------- ...eshRequest.java => LoginRequestDummy.java} | 2 +- ...nRequest.java => RefreshRequestDummy.java} | 2 +- ...nResponse.java => LoginResponseDummy.java} | 2 +- ...esponse.java => RefreshResponseDummy.java} | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) rename daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/{JwtRefreshRequest.java => LoginRequestDummy.java} (87%) rename daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/{LoginRequest.java => RefreshRequestDummy.java} (86%) rename daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/{LoginResponse.java => LoginResponseDummy.java} (84%) rename daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/{JwtRefreshResponse.java => RefreshResponseDummy.java} (80%) diff --git a/daepiro-app/src/main/resources/application.yml b/daepiro-app/src/main/resources/application.yml index 1d9ced2..7d7cd91 100644 --- a/daepiro-app/src/main/resources/application.yml +++ b/daepiro-app/src/main/resources/application.yml @@ -1,6 +1,6 @@ spring: profiles: - active: local + active: dev group: local: core,redis,auth,crawler,common,api dev: core,redis,auth,crawler,common,api diff --git a/daepiro-auth/src/main/java/com/numberone/backend/swagger/SwaggerDocumentController.java b/daepiro-auth/src/main/java/com/numberone/backend/swagger/SwaggerDocumentController.java index 785912e..873b8cd 100644 --- a/daepiro-auth/src/main/java/com/numberone/backend/swagger/SwaggerDocumentController.java +++ b/daepiro-auth/src/main/java/com/numberone/backend/swagger/SwaggerDocumentController.java @@ -1,10 +1,10 @@ package com.numberone.backend.swagger; -import com.numberone.backend.swagger.dto.request.JwtRefreshRequest; -import com.numberone.backend.swagger.dto.request.LoginRequest; -import com.numberone.backend.swagger.dto.response.JwtRefreshResponse; -import com.numberone.backend.swagger.dto.response.LoginResponse; +import com.numberone.backend.swagger.dto.request.RefreshRequestDummy; +import com.numberone.backend.swagger.dto.request.LoginRequestDummy; +import com.numberone.backend.swagger.dto.response.RefreshResponseDummy; +import com.numberone.backend.swagger.dto.response.LoginResponseDummy; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.PostMapping; @@ -26,22 +26,22 @@ public class SwaggerDocumentController {// 필터에서 처리하는 api의 경 이후 서버에 API 요청시 이 JWT 토큰을 같이 담아서 요청해야 정상적으로 API가 호출 됩니다. """) @PostMapping("/kakao") - public LoginResponse loginKakao(@RequestBody LoginRequest loginRequest) { + public LoginResponseDummy loginKakao(@RequestBody LoginRequestDummy loginRequestDummy) { return null; } -// @Operation(summary = "네이버 토큰을 이용하여 서버 JWT 토큰 발급받기", description = -// """ -// 네이버 토큰을 body 에 담아서 post 요청 해주세요. -// -// 앞으로 서버 요청 시에 사용할 수 있는 JWT 토큰이 발급됩니다. -// -// 이후 서버에 API 요청시 이 JWT 토큰을 같이 담아서 요청해야 정상적으로 API가 호출 됩니다. -// """) -// @PostMapping("/naver") -// public GetTokenResponse loginNaver(@RequestBody @Valid GetTokenRequest tokenRequest) { -// return tokenService.loginNaver(tokenRequest); -// } + @Operation(summary = "네이버 토큰을 이용하여 서버 JWT 토큰 발급받기", description = + """ + 네이버 토큰을 body 에 담아서 post 요청 해주세요. + + 앞으로 서버 요청 시에 사용할 수 있는 JWT 토큰이 발급됩니다. + + 이후 서버에 API 요청시 이 JWT 토큰을 같이 담아서 요청해야 정상적으로 API가 호출 됩니다. + """) + @PostMapping("/naver") + public LoginResponseDummy loginNaver(@RequestBody LoginRequestDummy loginRequestDummy) { + return null; + } @Operation(summary = "만료된 JWT 토큰 갱신하기", description = """ @@ -50,7 +50,7 @@ public LoginResponse loginKakao(@RequestBody LoginRequest loginRequest) { 새로 사용할 수 있는 JWT 토큰이 발급됩니다. """) @PostMapping("/refresh") - public JwtRefreshResponse refresh(@RequestBody JwtRefreshRequest jwtRefreshRequest) { + public RefreshResponseDummy refresh(@RequestBody RefreshRequestDummy refreshRequestDummy) { return null; } } diff --git a/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/JwtRefreshRequest.java b/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/LoginRequestDummy.java similarity index 87% rename from daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/JwtRefreshRequest.java rename to daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/LoginRequestDummy.java index 2fe035b..dc90e48 100644 --- a/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/JwtRefreshRequest.java +++ b/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/LoginRequestDummy.java @@ -6,6 +6,6 @@ @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) -public class JwtRefreshRequest { +public class LoginRequestDummy { private String token; } diff --git a/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/LoginRequest.java b/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/RefreshRequestDummy.java similarity index 86% rename from daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/LoginRequest.java rename to daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/RefreshRequestDummy.java index b759d28..c3cc011 100644 --- a/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/LoginRequest.java +++ b/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/request/RefreshRequestDummy.java @@ -6,6 +6,6 @@ @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) -public class LoginRequest { +public class RefreshRequestDummy { private String token; } diff --git a/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/LoginResponse.java b/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/LoginResponseDummy.java similarity index 84% rename from daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/LoginResponse.java rename to daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/LoginResponseDummy.java index 9ecae5e..145782d 100644 --- a/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/LoginResponse.java +++ b/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/LoginResponseDummy.java @@ -3,7 +3,7 @@ import lombok.Getter; @Getter -public class LoginResponse { +public class LoginResponseDummy { private String accessToken; private String refreshToken; private Boolean isOnboarding; diff --git a/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/JwtRefreshResponse.java b/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/RefreshResponseDummy.java similarity index 80% rename from daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/JwtRefreshResponse.java rename to daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/RefreshResponseDummy.java index 4cb69d9..5749049 100644 --- a/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/JwtRefreshResponse.java +++ b/daepiro-auth/src/main/java/com/numberone/backend/swagger/dto/response/RefreshResponseDummy.java @@ -3,7 +3,7 @@ import lombok.Getter; @Getter -public class JwtRefreshResponse { +public class RefreshResponseDummy { private String accessToken; private String refreshToken; }