Jelajahi Sumber

검색 결과 productPrice 파싱 오류 수정 (int -> decimal, 문자열/대형 값 허용)

쿠팡 검색 API가 Int32 범위를 넘는 productPrice를 반환하면
System.Text.Json 역직렬화가 실패해 검색 페이지가 500 오류를 냈다.
Product.cs와 동일하게 decimal + AllowReadingFromString 처리.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
KIM-JINO5 2 hari lalu
induk
melakukan
139fdae514
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      Models/Response/Search.cs

+ 2 - 1
Models/Response/Search.cs

@@ -47,7 +47,8 @@ namespace goods.Models.Coupang.Search
         public string ProductName { get; set; } = null!;
         public string ProductName { get; set; } = null!;
 
 
         [JsonPropertyName("productPrice")]
         [JsonPropertyName("productPrice")]
-        public int ProductPrice { get; set; }
+        [JsonNumberHandling(JsonNumberHandling.AllowReadingFromString)]
+        public decimal ProductPrice { get; set; }
 
 
         [JsonPropertyName("productUrl")]
         [JsonPropertyName("productUrl")]
         public string ProductUrl { get; set; } = null!;
         public string ProductUrl { get; set; } = null!;