diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/attachFile/adapter/in/web/AttachFileWebAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/attachFile/adapter/in/web/AttachFileWebAdapter.kt index b49a451..ca06a59 100644 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/attachFile/adapter/in/web/AttachFileWebAdapter.kt +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/attachFile/adapter/in/web/AttachFileWebAdapter.kt @@ -1,6 +1,7 @@ package hs.kr.entrydsm.feed.domain.attachFile.adapter.`in`.web import hs.kr.entrydsm.feed.domain.attachFile.application.service.CreateAttachFileService +import hs.kr.entrydsm.feed.global.document.attachFile.AttachFileApiDocument import org.springframework.web.bind.annotation.PostMapping import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RequestPart @@ -19,7 +20,7 @@ import org.springframework.web.multipart.MultipartFile @RequestMapping("/attach-file") class AttachFileWebAdapter( private val createAttachFileUseCase: CreateAttachFileService, -) { +) : AttachFileApiDocument { /** * 하나 이상의 첨부 파일을 업로드하고, 업로드된 파일 정보를 반환합니다. * @@ -36,7 +37,7 @@ class AttachFileWebAdapter( * @see CreateAttachFileService.execute */ @PostMapping - fun createAttachFile( + override fun createAttachFile( @RequestPart(value = "attach_file") attachFile: List, ) = createAttachFileUseCase.execute(attachFile) } diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/FaqWebAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/FaqWebAdapter.kt index 88243ab..b086ecf 100644 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/FaqWebAdapter.kt +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/faq/adapter/in/web/FaqWebAdapter.kt @@ -12,6 +12,7 @@ import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryFaqListUseCase import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.QueryTopFaqUseCase import hs.kr.entrydsm.feed.domain.faq.application.port.`in`.UpdateFaqUseCase import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType +import hs.kr.entrydsm.feed.global.document.faq.FaqApiDocument import org.springframework.http.HttpStatus import org.springframework.validation.annotation.Validated import org.springframework.web.bind.annotation.DeleteMapping @@ -50,10 +51,11 @@ class FaqWebAdapter( private val queryFaqListUseCase: QueryFaqListUseCase, private val queryTopFaqUseCase: QueryTopFaqUseCase, private val updateFaqUseCase: UpdateFaqUseCase, -) { +) : FaqApiDocument { + @ResponseStatus(HttpStatus.CREATED) @PostMapping - fun createFaq( + override fun createFaq( @RequestBody @Validated createFaqRequest: CreateFaqRequest, ) = createFaqUseCase.execute(createFaqRequest) @@ -65,7 +67,7 @@ class FaqWebAdapter( * @return FAQ 상세 정보가 포함된 응답 객체 */ @GetMapping("/{faq-id}") - fun queryFaqDetails( + override fun queryFaqDetails( @PathVariable("faq-id") faqId: UUID, ): FaqDetailsResponse = queryFaqDetailsUseCase.execute(faqId) @@ -76,7 +78,7 @@ class FaqWebAdapter( * @return 해당 유형의 FAQ 목록이 포함된 응답 객체 */ @GetMapping - fun queryFaqListByType( + override fun queryFaqListByType( @RequestParam("type") faqType: FaqType, ): FaqListResponse = queryFaqListByTypeUseCase.execute(faqType) @@ -86,7 +88,7 @@ class FaqWebAdapter( * @return 모든 FAQ 목록이 포함된 응답 객체 */ @GetMapping("/all") - fun queryFaqList(): FaqListResponse = queryFaqListUseCase.execute() + override fun queryFaqList(): FaqListResponse = queryFaqListUseCase.execute() /** * 최근에 등록된 FAQ 목록을 조회합니다. @@ -94,7 +96,7 @@ class FaqWebAdapter( * @return 최근 FAQ 목록이 포함된 응답 객체 */ @GetMapping("/recently") - fun queryTopFaq() = queryTopFaqUseCase.execute() + override fun queryTopFaq() = queryTopFaqUseCase.execute() /** * 기존 FAQ를 수정합니다. @@ -103,7 +105,7 @@ class FaqWebAdapter( * @param updateFaqRequest FAQ 수정 요청 데이터 */ @PatchMapping("/{faq-id}") - fun updateFaq( + override fun updateFaq( @PathVariable("faq-id") faqId: UUID, @RequestBody @Validated updateFaqRequest: UpdateFaqRequest, @@ -115,7 +117,7 @@ class FaqWebAdapter( * @param faqId 삭제할 FAQ의 고유 식별자 */ @DeleteMapping("/{faq-id}") - fun deleteFaq( + override fun deleteFaq( @PathVariable("faq-id") faqId: UUID, ) = deleteFaqUseCase.execute(faqId) } diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/notice/adapter/in/web/NoticeWebAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/notice/adapter/in/web/NoticeWebAdapter.kt index ded7ade..6035c2f 100644 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/notice/adapter/in/web/NoticeWebAdapter.kt +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/notice/adapter/in/web/NoticeWebAdapter.kt @@ -14,6 +14,7 @@ import hs.kr.entrydsm.feed.domain.notice.application.port.`in`.QueryNoticeTitleU import hs.kr.entrydsm.feed.domain.notice.application.port.`in`.UpdateNoticeUseCase import hs.kr.entrydsm.feed.domain.notice.application.port.`in`.UploadNoticeImageUseCase import hs.kr.entrydsm.feed.domain.notice.model.type.NoticeType +import hs.kr.entrydsm.feed.global.document.notice.NoticeApiDocument import jakarta.validation.Valid import org.springframework.http.HttpStatus import org.springframework.http.ResponseEntity @@ -45,7 +46,7 @@ class NoticeWebAdapter( private val queryNoticeTitleUseCase: QueryNoticeTitleUseCase, private val uploadNoticeImageUseCase: UploadNoticeImageUseCase, private val queryListNoticeListByTypeUseCase: QueryNoticeListByTypeUseCase, -) { +) : NoticeApiDocument { /** * 새로운 공지사항을 생성합니다. * @@ -53,7 +54,7 @@ class NoticeWebAdapter( */ @ResponseStatus(value = HttpStatus.CREATED) @PostMapping - fun createNotice( + override fun createNotice( @RequestBody @Valid createNoticeRequest: CreateNoticeRequest, ) { @@ -68,7 +69,7 @@ class NoticeWebAdapter( * @return 수정 결과에 대한 응답 엔티티 */ @PatchMapping("/{notice-id}") - fun updateNotice( + override fun updateNotice( @PathVariable(name = "notice-id") id: UUID, @RequestBody updateNoticeRequest: UpdateNoticeRequest, ): ResponseEntity = updateNoticeUseCase.execute(id, updateNoticeRequest) @@ -80,7 +81,7 @@ class NoticeWebAdapter( * @return 업로드된 이미지 정보가 포함된 응답 객체 */ @PostMapping("/image") - fun uploadImage( + override fun uploadImage( @RequestPart(name = "photo") image: MultipartFile, ): UploadNoticeImageResponse = uploadNoticeImageUseCase.execute(image) @@ -90,7 +91,7 @@ class NoticeWebAdapter( * @return 공지사항 제목 목록이 포함된 응답 객체 리스트 */ @GetMapping("/title") - fun queryNoticeTitle(): List = queryNoticeTitleUseCase.execute() + override fun queryNoticeTitle(): List = queryNoticeTitleUseCase.execute() /** * 특정 공지사항의 상세 정보를 조회합니다. @@ -99,7 +100,7 @@ class NoticeWebAdapter( * @return 공지사항 상세 정보가 포함된 응답 객체 */ @GetMapping("/{notice-id}") - fun queryDetailsNotice( + override fun queryDetailsNotice( @PathVariable(name = "notice-id", required = true) noticeId: UUID, ): QueryDetailsNoticeResponse = queryDetailsNoticeUseCase.execute(noticeId) @@ -111,7 +112,7 @@ class NoticeWebAdapter( * @return 해당 유형의 공지사항 목록이 포함된 응답 객체 */ @GetMapping - fun queryNoticeListByType( + override fun queryNoticeListByType( @RequestParam("type") noticeType: NoticeType?, ): QueryListNoticeResponse = queryListNoticeListByTypeUseCase.execute(noticeType) @@ -122,7 +123,7 @@ class NoticeWebAdapter( */ @ResponseStatus(value = HttpStatus.NO_CONTENT) @DeleteMapping("/{notice-id}") - fun deleteNotice( + override fun deleteNotice( @PathVariable(name = "notice-id")id: UUID, ) = deleteNoticeUseCase.execute(id) } diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/in/web/ReserveWebAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/in/web/ReserveWebAdapter.kt index 0ddce2a..38d8e04 100644 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/in/web/ReserveWebAdapter.kt +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/reserve/adapter/in/web/ReserveWebAdapter.kt @@ -1,6 +1,7 @@ package hs.kr.entrydsm.feed.domain.reserve.adapter.`in`.web import hs.kr.entrydsm.feed.domain.reserve.application.port.`in`.GetReserveUseCase +import hs.kr.entrydsm.feed.global.document.reserve.ReserveApiDocument import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController @@ -17,12 +18,12 @@ import org.springframework.web.bind.annotation.RestController @RequestMapping("/reserve") class ReserveWebAdapter( private val getReserveUseCase: GetReserveUseCase, -) { +) : ReserveApiDocument { /** * 예약 페이지 링크를 조회합니다. * * @return 예약 페이지 URL 문자열 */ @GetMapping - fun reserveLink(): String = getReserveUseCase.execute() + override fun reserveLink(): String = getReserveUseCase.execute() } diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/ScreenWebAdapter.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/ScreenWebAdapter.kt index 7027e65..1bd1885 100644 --- a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/ScreenWebAdapter.kt +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/domain/screen/adatper/in/web/ScreenWebAdapter.kt @@ -5,6 +5,7 @@ import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.ScreenRes import hs.kr.entrydsm.feed.domain.screen.application.port.`in`.CreateScreenUseCase import hs.kr.entrydsm.feed.domain.screen.application.port.`in`.QueryScreenUseCase import hs.kr.entrydsm.feed.domain.screen.application.port.`in`.UpdateScreenUseCase +import hs.kr.entrydsm.feed.global.document.screen.ScreenApiDocument import org.springframework.http.HttpStatus import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PatchMapping @@ -33,7 +34,7 @@ class ScreenWebAdapter( private val createScreenUseCase: CreateScreenUseCase, private val updateScreenUseCase: UpdateScreenUseCase, private val queryScreenUseCase: QueryScreenUseCase, -) { +) : ScreenApiDocument { /** * 새로운 화면 이미지를 업로드하고 저장합니다. * @@ -42,7 +43,7 @@ class ScreenWebAdapter( */ @ResponseStatus(value = HttpStatus.CREATED) @PostMapping - suspend fun createScreen( + override suspend fun createScreen( @RequestPart(name = "image") image: MultipartFile, ): ScreenResponse = createScreenUseCase.execute(image) @@ -54,7 +55,7 @@ class ScreenWebAdapter( * @return 업데이트된 화면 이미지 정보가 포함된 응답 객체 */ @PatchMapping("/{screen-id}") - fun updateScreen( + override fun updateScreen( @PathVariable(name = "screen-id") id: UUID, @RequestPart(name = "image") image: MultipartFile, ): ScreenResponse = updateScreenUseCase.execute(id, image) @@ -65,5 +66,5 @@ class ScreenWebAdapter( * @return 화면 이미지 목록이 포함된 응답 객체 리스트 */ @GetMapping - fun queryScreen(): List = queryScreenUseCase.execute() + override fun queryScreen(): List = queryScreenUseCase.execute() } diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/attachFile/AttachFileApiDocument.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/attachFile/AttachFileApiDocument.kt new file mode 100644 index 0000000..4fa9bd9 --- /dev/null +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/attachFile/AttachFileApiDocument.kt @@ -0,0 +1,36 @@ +package hs.kr.entrydsm.feed.global.document.attachFile + +import hs.kr.entrydsm.feed.domain.attachFile.adapter.`in`.web.dto.response.CreateAttachFileResponse +import io.swagger.v3.oas.annotations.tags.Tag +import io.swagger.v3.oas.annotations.Operation +import io.swagger.v3.oas.annotations.media.Content +import io.swagger.v3.oas.annotations.responses.ApiResponse +import io.swagger.v3.oas.annotations.responses.ApiResponses +import org.springframework.web.bind.annotation.RequestPart +import org.springframework.web.multipart.MultipartFile + +/** + * AttachFile API 문서화를 위한 인터페이스입니다. + */ +@Tag(name = "AttachFile", description = "첨부 파일 API") +interface AttachFileApiDocument { + + @Operation( + summary = "첨부 파일 업로드", + description = + "1. 이미 동일한 이름의 파일이 존재하면 삭제합니다.\n" + + "2. 파일을 S3에 업로드합니다.\n" + + "3. 업로드된 파일 정보를 데이터베이스에 저장합니다.\n" + + "4. 업로드된 파일에 접근할 수 있는 URL을 생성하여 응답을 반환합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "파일 업로드 성공", + content = arrayOf(Content()) + ) + ) + fun createAttachFile( + @RequestPart(value = "attach_file") attachFile: List, + ): List +} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/faq/FaqApiDocument.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/faq/FaqApiDocument.kt new file mode 100644 index 0000000..f183101 --- /dev/null +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/faq/FaqApiDocument.kt @@ -0,0 +1,144 @@ +package hs.kr.entrydsm.feed.global.document.faq + +import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.CreateFaqRequest +import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.request.UpdateFaqRequest +import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqDetailsResponse +import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqListResponse +import hs.kr.entrydsm.feed.domain.faq.adapter.`in`.web.dto.response.FaqTitleResponse +import hs.kr.entrydsm.feed.domain.faq.model.type.FaqType +import io.swagger.v3.oas.annotations.Operation +import io.swagger.v3.oas.annotations.media.Content +import io.swagger.v3.oas.annotations.responses.ApiResponse +import io.swagger.v3.oas.annotations.responses.ApiResponses +import io.swagger.v3.oas.annotations.tags.Tag +import org.springframework.validation.annotation.Validated +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestParam +import java.util.UUID + +/** + * Faq API 문서화를 위한 인터페이스입니다. + */ +@Tag(name = "Faq", description = "자주 묻는 질문 API") +interface FaqApiDocument { + + @Operation( + summary = "Faq 생성", + description = "새로운 FAQ를 생성합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "201", + description = "Faq 생성 성공", + content = arrayOf(Content()) + ) + ) + fun createFaq( + @RequestBody @Validated + createFaqRequest: CreateFaqRequest, + ) + + @Operation( + summary = "Faq 상세 조회", + description = "FAQ를 상세 조회합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "Faq 상세 조회 성공", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "404", + description = "Faq를 찾을 수 없습니다. - Faq Not Found", + content = arrayOf(Content()) + ) + ) + fun queryFaqDetails( + @PathVariable("faq-id") faqId: UUID, + ): FaqDetailsResponse + + @Operation( + summary = "종류별 Faq 전체 조회", + description = "종류별 FAQ를 전체 조회합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "종류별 Faq 전체 조회 성공", + content = arrayOf(Content()) + ) + ) + fun queryFaqListByType( + @RequestParam("type") faqType: FaqType, + ): FaqListResponse + + @Operation( + summary = "Faq 전체 조회", + description = "FAQ를 전체 조회합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "Faq 전체 조회 성공", + content = arrayOf(Content()) + ) + ) + fun queryFaqList(): FaqListResponse + + @Operation( + summary = "상위 Faq 조회", + description = "최근에 생성된 상위 5개의 FAQ를 조회합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "상위 Faq 조회 성공", + content = arrayOf(Content()) + ) + ) + fun queryTopFaq(): List + + @Operation( + summary = "Faq 수정", + description = "FAQ를 수정합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "Faq 수정 성공", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "404", + description = "Faq를 찾을 수 없습니다. - Faq Not Found", + content = arrayOf(Content()) + ) + ) + fun updateFaq( + @PathVariable("faq-id") faqId: UUID, + @RequestBody @Validated + updateFaqRequest: UpdateFaqRequest, + ) + + @Operation( + summary = "Faq 삭제", + description = "FAQ를 삭제합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "Faq 삭제 성공", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "404", + description = "Faq를 찾을 수 없습니다. - Faq Not Found", + content = arrayOf(Content()) + ) + ) + fun deleteFaq( + @PathVariable("faq-id") faqId: UUID, + ) +} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/notice/NoticeApiDocument.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/notice/NoticeApiDocument.kt new file mode 100644 index 0000000..734b188 --- /dev/null +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/notice/NoticeApiDocument.kt @@ -0,0 +1,161 @@ +package hs.kr.entrydsm.feed.global.document.notice + +import hs.kr.entrydsm.feed.domain.notice.adapter.`in`.web.dto.request.CreateNoticeRequest +import hs.kr.entrydsm.feed.domain.notice.adapter.`in`.web.dto.request.UpdateNoticeRequest +import hs.kr.entrydsm.feed.domain.notice.adapter.`in`.web.dto.response.QueryDetailsNoticeResponse +import hs.kr.entrydsm.feed.domain.notice.adapter.`in`.web.dto.response.QueryListNoticeResponse +import hs.kr.entrydsm.feed.domain.notice.adapter.`in`.web.dto.response.QueryNoticeTitleResponse +import hs.kr.entrydsm.feed.domain.notice.adapter.`in`.web.dto.response.UploadNoticeImageResponse +import hs.kr.entrydsm.feed.domain.notice.model.type.NoticeType +import io.swagger.v3.oas.annotations.Operation +import io.swagger.v3.oas.annotations.media.Content +import io.swagger.v3.oas.annotations.responses.ApiResponse +import io.swagger.v3.oas.annotations.responses.ApiResponses +import io.swagger.v3.oas.annotations.tags.Tag +import jakarta.validation.Valid +import org.springframework.http.ResponseEntity +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.bind.annotation.RequestParam +import org.springframework.web.bind.annotation.RequestPart +import org.springframework.web.multipart.MultipartFile +import java.util.UUID + +/** + * Notice API 문서화를 위한 인터페이스입니다. + */ +@Tag(name = "Notice", description = "공지사항 API") +interface NoticeApiDocument { + + @Operation( + summary = "공지사항 생성", + description = "새로운 공지사항을 생성합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "201", + description = "공지사항 생성 성공", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "404", + description = "AttachFile을 찾을 수 없습니다. - AttachFile Not Found", + content = arrayOf(Content()) + ) + ) + fun createNotice( + @RequestBody @Valid + createNoticeRequest: CreateNoticeRequest, + ) + + @Operation( + summary = "공지사항 수정", + description = "공지사항을 수정합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "공지사항 수정 성공", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "404", + description = "Notice를 찾을 수 없습니다. - Notice Not Found", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "404", + description = "AttachFile을 찾을 수 없습니다. - AttachFile Not Found", + content = arrayOf(Content()) + ) + ) + fun updateNotice( + @PathVariable(name = "notice-id") id: UUID, + @RequestBody updateNoticeRequest: UpdateNoticeRequest, + ): ResponseEntity + + @Operation( + summary = "이미지 업로드", + description = "공지사항에 첨부할 이미지를 업로드합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "이미지 업로드 성공", + content = arrayOf(Content()) + ) + ) + fun uploadImage( + @RequestPart(name = "photo") image: MultipartFile, + ): UploadNoticeImageResponse + + @Operation( + summary = "공지사항 제목 조회", + description = "공지사항 제목을 조회합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "공지사항 제목 조회 성공", + content = arrayOf(Content()) + ) + ) + fun queryNoticeTitle(): List + + @Operation( + summary = "공지사항 상세 조회", + description = "공지사항을 상세 조회합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "공지사항 상세 조회 성공", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "404", + description = "Notice를 찾을 수 없습니다. - Notice Not Found", + content = arrayOf(Content()) + ) + ) + fun queryDetailsNotice( + @PathVariable(name = "notice-id", required = true) + noticeId: UUID, + ): QueryDetailsNoticeResponse + + @Operation( + summary = "종류별 공지사항 전체 조회", + description = "종류별 공지사항을 전체 조회합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "종류별 공지사항 전체 조회 성공", + content = arrayOf(Content()) + ) + ) + fun queryNoticeListByType( + @RequestParam("type") noticeType: NoticeType?, + ): QueryListNoticeResponse + + @Operation( + summary = "공지사항 삭제", + description = "공지사항을 삭제합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "공지사항 삭제 성공", + content = arrayOf(Content()) + ) + , + ApiResponse( + responseCode = "404", + description = "Notice를 찾을 수 없습니다. - Notice Not Found", + content = arrayOf(Content()) + ) + ) + fun deleteNotice( + @PathVariable(name = "notice-id")id: UUID, + ) +} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/reserve/ReserveApiDocument.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/reserve/ReserveApiDocument.kt new file mode 100644 index 0000000..39223d6 --- /dev/null +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/reserve/ReserveApiDocument.kt @@ -0,0 +1,27 @@ +package hs.kr.entrydsm.feed.global.document.reserve + +import io.swagger.v3.oas.annotations.Operation +import io.swagger.v3.oas.annotations.media.Content +import io.swagger.v3.oas.annotations.responses.ApiResponse +import io.swagger.v3.oas.annotations.responses.ApiResponses +import io.swagger.v3.oas.annotations.tags.Tag + +/** + * Reserve API 문서화를 위한 인터페이스입니다. + */ +@Tag(name = "Reserve", description = "예약 링크 API") +interface ReserveApiDocument { + + @Operation( + summary = "예약 페이지 링크 조회", + description = "예약 페이지 링크를 조회합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "200", + description = "예약 페이지 링크 조회 성공", + content = arrayOf(Content()) + ) + ) + fun reserveLink(): String +} diff --git a/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/screen/ScreenApiDocument.kt b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/screen/ScreenApiDocument.kt new file mode 100644 index 0000000..188e729 --- /dev/null +++ b/casper-feed/src/main/kotlin/hs/kr/entrydsm/feed/global/document/screen/ScreenApiDocument.kt @@ -0,0 +1,84 @@ +package hs.kr.entrydsm.feed.global.document.screen + +import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.QueryScreenResponse +import hs.kr.entrydsm.feed.domain.screen.adatper.`in`.web.dto.response.ScreenResponse +import io.swagger.v3.oas.annotations.Operation +import io.swagger.v3.oas.annotations.media.Content +import io.swagger.v3.oas.annotations.responses.ApiResponse +import io.swagger.v3.oas.annotations.responses.ApiResponses +import io.swagger.v3.oas.annotations.tags.Tag +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.RequestPart +import org.springframework.web.multipart.MultipartFile +import java.util.UUID + +/** + * Screen API 문서화를 위한 인터페이스입니다. + */ +@Tag(name = "Screen", description = "전형 요강 API") +interface ScreenApiDocument { + + @Operation( + summary = "전형 요강 이미지 업로드", + description = "전형 요강 이미지를 업로드합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "201", + description = "전형 요강 이미지 업로드 성공", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "400", + description = "파일이 비어있습니다.", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "400", + description = "허용되지 않은 확장자입니다.", + content = arrayOf(Content()) + ), + ) + suspend fun createScreen( + @RequestPart(name = "image") image: MultipartFile, + ): ScreenResponse + + @Operation( + summary = "전형 요강 이미지 수정", + description = "전형 요강 이미지를 수정합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "201", + description = "전형 요강 이미지 수정 성공", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "400", + description = "파일이 비어있습니다.", + content = arrayOf(Content()) + ), + ApiResponse( + responseCode = "400", + description = "허용되지 않은 확장자입니다.", + content = arrayOf(Content()) + ), + ) + fun updateScreen( + @PathVariable(name = "screen-id") id: UUID, + @RequestPart(name = "image") image: MultipartFile, + ): ScreenResponse + + @Operation( + summary = "전형 요강 이미지 조회", + description = "전형 요강 이미지를 조회합니다." + ) + @ApiResponses( + ApiResponse( + responseCode = "201", + description = "전형 요강 이미지 조회 성공", + content = arrayOf(Content()) + ) + ) + fun queryScreen(): List +}