From a16b5ff76ee665edc9e3e370d5ffdcf1fdcba6ca Mon Sep 17 00:00:00 2001 From: seungtaekhong Date: Wed, 20 Dec 2023 14:55:45 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=9E=9C=EB=93=9C=EB=A7=88=ED=81=AC=20?= =?UTF-8?q?=EC=B5=9C=EB=8C=80=EC=A0=90=EC=88=98=20=EC=9C=A0=EC=A0=80=20?= =?UTF-8?q?=EC=B0=BE=EA=B8=B0=20API=20Swagger=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../playkuroundserver/domain/landmark/api/LandmarkApi.java | 5 ++++- .../landmark/dto/response/LandmarkHighestScoreUser.java | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) 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() {