File tree Expand file tree Collapse file tree
apps/commerce-streamer/src/main/java/com/loopers/interfaces/api/ranking Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import io .swagger .v3 .oas .annotations .media .Schema ;
66import io .swagger .v3 .oas .annotations .responses .ApiResponses ;
77import io .swagger .v3 .oas .annotations .tags .Tag ;
8+ import jakarta .validation .Valid ;
89import org .springframework .web .bind .annotation .DeleteMapping ;
910import org .springframework .web .bind .annotation .GetMapping ;
1011import org .springframework .web .bind .annotation .PutMapping ;
@@ -34,7 +35,7 @@ public interface RankingConfigV1ApiSpec {
3435 })
3536 @ PutMapping ("/weights" )
3637 RankingConfigV1Dto .WeightConfigResponse updateWeights (
37- @ RequestBody RankingConfigV1Dto .WeightConfigRequest request
38+ @ Valid @ RequestBody RankingConfigV1Dto .WeightConfigRequest request
3839 );
3940
4041 @ Operation (summary = "가중치 초기화" , description = "랭킹 가중치를 기본값으로 초기화합니다." )
Original file line number Diff line number Diff line change 11package com .loopers .interfaces .api .ranking ;
22
3+ import jakarta .validation .constraints .Min ;
4+
35public class RankingConfigV1Dto {
46
57 public record WeightConfigRequest (
8+ @ Min (value = 0 , message = "viewWeight는 0 이상이어야 합니다." )
69 double viewWeight ,
10+
11+ @ Min (value = 0 , message = "likeWeight는 0 이상이어야 합니다." )
712 double likeWeight ,
13+
14+ @ Min (value = 0 , message = "orderWeight는 0 이상이어야 합니다." )
815 double orderWeight
916 ) {}
1017
You can’t perform that action at this time.
0 commit comments