Skip to content

Commit

Permalink
feat(TimeBlockControllerDocs): 파일 태그 추가 및 삭제 스웨거 정보 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Chan531 committed Dec 12, 2024
1 parent dc0ef56 commit e62f596
Showing 1 changed file with 77 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.tiki.server.timeblock.controller.docs;

import java.security.Principal;
import java.util.List;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
Expand Down Expand Up @@ -200,4 +201,80 @@ ResponseEntity<?> deleteTimeBlock(
)
@PathVariable long timeBlockId
);

@Operation(
summary = "타임 블록 파일 태그 추가",
description = "타임 블록에 파일 태그를 추가한다.",
responses = {
@ApiResponse(responseCode = "201", description = "성공"),
@ApiResponse(
responseCode = "4xx",
description = "클라이언트(요청) 오류",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
@ApiResponse(
responseCode = "500",
description = "서버 내부 오류",
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))}
)
SuccessResponse<?> createDocumentTag(
@Parameter(hidden = true) Principal principal,
@Parameter(
name = "teamId",
description = "팀 id",
in = ParameterIn.PATH,
example = "1"
) @PathVariable long teamId,
@Parameter(
name = "timeBlockId",
description = "타임 블록 id",
in = ParameterIn.PATH,
example = "1"
) @PathVariable long timeBlockId,
@Parameter(
name = "documentId",
description = "추가할 파일 id 리스트",
in = ParameterIn.QUERY,
required = true,
example = "[1, 2]"
) @RequestParam("documentId") List<Long> documentIds
);

@Operation(
summary = "타임 블록 파일 태그 삭제",
description = "타임 블록의 파일 태그를 삭제한다.",
responses = {
@ApiResponse(responseCode = "204", description = "성공"),
@ApiResponse(
responseCode = "4xx",
description = "클라이언트(요청) 오류",
content = @Content(schema = @Schema(implementation = ErrorResponse.class))),
@ApiResponse(
responseCode = "500",
description = "서버 내부 오류",
content = @Content(schema = @Schema(implementation = ErrorResponse.class)))}
)
SuccessResponse<?> deleteDocumentTag(
@Parameter(hidden = true) Principal principal,
@Parameter(
name = "teamId",
description = "팀 id",
in = ParameterIn.PATH,
example = "1"
)
@PathVariable long teamId,
@Parameter(
name = "timeBlockId",
description = "타임 블록 id",
in = ParameterIn.PATH,
example = "1"
)
@PathVariable long timeBlockId,
@Parameter(
name = "tagId",
description = "삭제할 파일 태그 id 리스트",
in = ParameterIn.QUERY,
required = true,
example = "[1, 2]"
) @RequestParam("tagId") List<Long> tagIds
);
}

0 comments on commit e62f596

Please sign in to comment.