diff --git a/src/main/kotlin/com/mjucow/eatda/domain/store/service/query/dto/StoreDto.kt b/src/main/kotlin/com/mjucow/eatda/domain/store/service/query/dto/StoreDto.kt index e98c577..9fe79d0 100644 --- a/src/main/kotlin/com/mjucow/eatda/domain/store/service/query/dto/StoreDto.kt +++ b/src/main/kotlin/com/mjucow/eatda/domain/store/service/query/dto/StoreDto.kt @@ -4,12 +4,18 @@ import com.fasterxml.jackson.annotation.JsonUnwrapped import com.mjucow.eatda.common.vo.PhoneNumber import com.mjucow.eatda.common.vo.Point import com.mjucow.eatda.domain.store.entity.Store +import io.swagger.v3.oas.annotations.media.Schema data class StoreDto( + @Schema(name = "id", example = "5") val id: Long, + @Schema(name = "displayedName", example = "명지대학교") val displayedName: String, + @Schema(name = "address", example = "서울특별시 서대문구 거북골로 34") val address: String, - @JsonUnwrapped val phoneNumber: PhoneNumber? = null, + @JsonUnwrapped + val phoneNumber: PhoneNumber? = null, + @Schema(name = "imageAddress", example = "/eatda/public/store/232D8241-C6A9-4AD9-B0EA-56F6DD24BADF.jpg") val imageAddress: String? = null, val location: Point? = null, ) { diff --git a/src/main/kotlin/com/mjucow/eatda/presentation/common/example/StoreDtosApiResponse.kt b/src/main/kotlin/com/mjucow/eatda/presentation/common/example/StoreDtosApiResponse.kt deleted file mode 100644 index a007503..0000000 --- a/src/main/kotlin/com/mjucow/eatda/presentation/common/example/StoreDtosApiResponse.kt +++ /dev/null @@ -1,78 +0,0 @@ -package com.mjucow.eatda.presentation.common.example - -import io.swagger.v3.oas.annotations.media.Content -import io.swagger.v3.oas.annotations.media.ExampleObject -import io.swagger.v3.oas.annotations.responses.ApiResponse - -@Target(AnnotationTarget.FUNCTION) -@ApiResponse( - responseCode = "200", - description = "성공", - content = [ - Content( - mediaType = "application/json", - examples = [ - ExampleObject( - name = "example", - value = """ - { - "message": null, - "body": { - "content": [ - { - "id": 1, - "displayedName": "띵지대", - "address": "서울특별시 서대문구 거북골로 34", - "imageAddress": null, - "location": null - }, - { - "id": 2, - "displayedName": "띵지대", - "address": "서울특별시 서대문구 거북골로 34", - "imageAddress": null, - "location": null - }, - { - "id": 3, - "displayedName": "띵지대", - "address": "서울특별시 서대문구 거북골로 34", - "imageAddress": null, - "location": null - }, - { - "id": 4, - "displayedName": "띵지대", - "address": "서울특별시 서대문구 거북골로 34", - "imageAddress": null, - "location": null - }, - { - "id": 5, - "displayedName": "띵지대", - "address": "서울특별시 서대문구 거북골로 34", - "imageAddress": null, - "location": null - } - ], - "pageable": "INSTANCE", - "first": true, - "last": true, - "size": 20, - "number": 0, - "sort": { - "empty": true, - "unsorted": true, - "sorted": false - }, - "numberOfElements": 20, - "empty": false - } - } - """ - ) - ] - ) - ] -) -annotation class StoreDtosApiResponse() diff --git a/src/main/kotlin/com/mjucow/eatda/presentation/store/StoreApiPresentation.kt b/src/main/kotlin/com/mjucow/eatda/presentation/store/StoreApiPresentation.kt index dd8b2f9..95c6e1e 100644 --- a/src/main/kotlin/com/mjucow/eatda/presentation/store/StoreApiPresentation.kt +++ b/src/main/kotlin/com/mjucow/eatda/presentation/store/StoreApiPresentation.kt @@ -8,7 +8,6 @@ import com.mjucow.eatda.domain.store.service.query.dto.MenuList import com.mjucow.eatda.domain.store.service.query.dto.StoreDetailDto import com.mjucow.eatda.domain.store.service.query.dto.StoreDto import com.mjucow.eatda.presentation.common.ApiResponse -import com.mjucow.eatda.presentation.common.example.StoreDtosApiResponse import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.tags.Tag @@ -19,7 +18,6 @@ interface StoreApiPresentation { fun create(command: StoreCreateCommand): ApiResponse @Operation(summary = "커서 기반 카테고리 가게 조회", description = "커서를 기반으로 가게를 조회합니다.") - @StoreDtosApiResponse fun findAllByCategoryIdAndCursor( cursor: Long?, categoryId: Long?,