Skip to content

Commit 8164d6e

Browse files
committed
fix: #102 카카오 API 요청에 대한 response dto에 @JsonIgnoreProperties 추가
1 parent 9846c33 commit 8164d6e

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/main/java/com/ajou/hertz/common/auth/dto/response/JwtTokenInfoResponse.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class JwtTokenInfoResponse {
1818
@Schema(description = "Token value", example = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwicm9sZSI6IlJPTEVfVVNFUiIsImxvZ2luVHlwZSI6IktBS0FPIiwiaWF0IjoxNjc3NDg0NzExLCJleHAiOjE2Nzc1Mjc5MTF9.eM2R_mMRqkPUsMmJN_vm2lAsIGownPJZ6Xu47K6ujrI")
1919
private String token;
2020

21-
@Schema(description = "Token 만료 시각", example = "2023-02-28T17:13:55.473")
21+
@Schema(description = "Token 만료 시각")
2222
private LocalDateTime expiresAt;
2323

2424
public static JwtTokenInfoResponse from(JwtTokenInfoDto jwtTokenInfoDto) {

src/main/java/com/ajou/hertz/common/kakao/dto/response/KakaoTokenResponse.java

+2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
import org.springframework.lang.Nullable;
44

5+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
56
import com.fasterxml.jackson.annotation.JsonProperty;
67

78
import lombok.AccessLevel;
89
import lombok.AllArgsConstructor;
910
import lombok.Getter;
1011
import lombok.NoArgsConstructor;
1112

13+
@JsonIgnoreProperties(ignoreUnknown = true)
1214
@AllArgsConstructor(access = AccessLevel.PRIVATE)
1315
@NoArgsConstructor(access = AccessLevel.PRIVATE)
1416
@Getter

src/main/java/com/ajou/hertz/common/kakao/dto/response/KakaoUserInfoResponse.java

+4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
import org.springframework.lang.Nullable;
66
import org.springframework.util.StringUtils;
77

8+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
89
import com.fasterxml.jackson.annotation.JsonProperty;
910

11+
@JsonIgnoreProperties(ignoreUnknown = true)
1012
public record KakaoUserInfoResponse(
1113
String id,
1214
@JsonProperty("kakao_account") KakaoAccount kakaoAccount
1315
) {
1416

17+
@JsonIgnoreProperties(ignoreUnknown = true)
1518
public record KakaoAccount(
1619
@JsonProperty("profile_image_needs_agreement") Boolean profileImageNeedsAgreement,
1720
Profile profile,
@@ -38,6 +41,7 @@ public record KakaoAccount(
3841
String gender
3942
) {
4043

44+
@JsonIgnoreProperties(ignoreUnknown = true)
4145
public record Profile(
4246
@JsonProperty("profile_image_url") String profileImageUrl,
4347
@JsonProperty("thumbnail_image_url") String thumbnailImageUrl,

0 commit comments

Comments
 (0)