Skip to content

Commit

Permalink
fix: #102 카카오 API 요청에 대한 response dto에 @JsonIgnoreProperties 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Wo-ogie committed Apr 9, 2024
1 parent 9846c33 commit 51e05a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class JwtTokenInfoResponse {
@Schema(description = "Token value", example = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwicm9sZSI6IlJPTEVfVVNFUiIsImxvZ2luVHlwZSI6IktBS0FPIiwiaWF0IjoxNjc3NDg0NzExLCJleHAiOjE2Nzc1Mjc5MTF9.eM2R_mMRqkPUsMmJN_vm2lAsIGownPJZ6Xu47K6ujrI")
private String token;

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

public static JwtTokenInfoResponse from(JwtTokenInfoDto jwtTokenInfoDto) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import org.springframework.lang.Nullable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@JsonIgnoreProperties(ignoreUnknown = true)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@NoArgsConstructor(access = AccessLevel.PRIVATE)
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
import org.springframework.lang.Nullable;
import org.springframework.util.StringUtils;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public record KakaoUserInfoResponse(
String id,
@JsonProperty("kakao_account") KakaoAccount kakaoAccount
) {

@JsonIgnoreProperties(ignoreUnknown = true)
public record KakaoAccount(
@JsonProperty("profile_image_needs_agreement") Boolean profileImageNeedsAgreement,
Profile profile,
Expand All @@ -38,6 +41,7 @@ public record KakaoAccount(
String gender
) {

@JsonIgnoreProperties(ignoreUnknown = true)
public record Profile(
@JsonProperty("profile_image_url") String profileImageUrl,
@JsonProperty("thumbnail_image_url") String thumbnailImageUrl,
Expand Down

0 comments on commit 51e05a0

Please sign in to comment.