diff --git a/src/main/java/com/playkuround/playkuroundserver/domain/landmark/api/LandmarkApi.java b/src/main/java/com/playkuround/playkuroundserver/domain/landmark/api/LandmarkApi.java index 157d3758..f440a986 100644 --- a/src/main/java/com/playkuround/playkuroundserver/domain/landmark/api/LandmarkApi.java +++ b/src/main/java/com/playkuround/playkuroundserver/domain/landmark/api/LandmarkApi.java @@ -24,7 +24,7 @@ public class LandmarkApi { @GetMapping @Operation(summary = "가장 가까운 랜드마크 찾기", - description = "인식 반경 내에 있는 랜드마크 중 가장 가까운 랜드마크를 반환합니다." + + description = "인식 반경 내에 있는 랜드마크 중 가장 가까운 랜드마크를 반환합니다. " + "인식 반경에 랜드마크가 없을 경우 아무것도 반환하지 않습니다.") public ApiResponse LandmarkFindNear(@RequestParam @Latitude Double latitude, @RequestParam @Longitude Double longitude) { @@ -33,6 +33,9 @@ public ApiResponse LandmarkFindNear(@RequestParam @Lati } @GetMapping("/{landmarkId}/highest") + @Operation(summary = "해당 랜드마크의 최고점 사용자 찾기", + description = "해당 랜드마크에서 가장 높은 점수를 획득한 사용자를 반환합니다. " + + "방문한 유저가 한명도 없으면 아무것도 반환하지 않습니다. 점수가 같은 유저가 있다면 먼저 해당 점수를 달성한 유저를 반환합니다.") public ApiResponse findHighestUserByLandmark(@PathVariable Long landmarkId) { LandmarkHighestScoreUser response = landmarkScoreService.findHighestScoreUserByLandmark(landmarkId); return ApiUtils.success(response); diff --git a/src/main/java/com/playkuround/playkuroundserver/domain/landmark/dto/response/LandmarkHighestScoreUser.java b/src/main/java/com/playkuround/playkuroundserver/domain/landmark/dto/response/LandmarkHighestScoreUser.java index 1bee43fd..f0f4fae5 100644 --- a/src/main/java/com/playkuround/playkuroundserver/domain/landmark/dto/response/LandmarkHighestScoreUser.java +++ b/src/main/java/com/playkuround/playkuroundserver/domain/landmark/dto/response/LandmarkHighestScoreUser.java @@ -1,6 +1,7 @@ package com.playkuround.playkuroundserver.domain.landmark.dto.response; import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Getter; @@ -8,7 +9,9 @@ @AllArgsConstructor @JsonInclude(value = JsonInclude.Include.NON_EMPTY) public class LandmarkHighestScoreUser { + @Schema(description = "사용자 닉네임", example = "내가제일이다") private String nickname; + @Schema(description = "최고 점수", example = "294") private Long score; public static LandmarkHighestScoreUser createEmptyResponse() {