|
6 | 6 | import com.jobnote.global.annotation.swagger.ApiErrorResponseExplanation; |
7 | 7 | import com.jobnote.global.annotation.swagger.ApiResponseExplanations; |
8 | 8 | import com.jobnote.global.annotation.swagger.ApiSuccessResponseExplanation; |
| 9 | +import com.jobnote.global.annotation.swagger.PageableAsQueryParam; |
9 | 10 | import com.jobnote.global.common.ApiResponse; |
10 | 11 | import com.jobnote.global.common.ResponseCode; |
11 | 12 | import io.swagger.v3.oas.annotations.Operation; |
12 | 13 | import io.swagger.v3.oas.annotations.Parameter; |
13 | 14 | import io.swagger.v3.oas.annotations.tags.Tag; |
14 | 15 | import jakarta.validation.Valid; |
| 16 | +import org.springframework.data.domain.Page; |
| 17 | +import org.springframework.data.domain.Pageable; |
15 | 18 | import org.springframework.http.ResponseEntity; |
16 | 19 | import org.springframework.web.bind.annotation.PathVariable; |
17 | 20 | import org.springframework.web.bind.annotation.RequestBody; |
@@ -58,26 +61,18 @@ ResponseEntity<ApiResponse<Void>> uploadNewVersionDocument( |
58 | 61 | ); |
59 | 62 |
|
60 | 63 | @Operation(summary = "문서 목록 조회") |
61 | | - @ApiResponseExplanations( |
62 | | - success = @ApiSuccessResponseExplanation( |
63 | | - responseClass = DocumentListResponse.class, |
64 | | - description = "조회 성공" |
65 | | - ) |
66 | | - ) |
67 | | - ResponseEntity<ApiResponse<DocumentListResponse>> getAllDocuments( |
68 | | - @Parameter(hidden = true) @LoginUser final CustomUserDetails principal |
| 64 | + @PageableAsQueryParam |
| 65 | + ResponseEntity<ApiResponse<Page<DocumentResponse>>> getAllDocuments( |
| 66 | + @Parameter(hidden = true) @LoginUser final CustomUserDetails principal, |
| 67 | + @Parameter(hidden = true) Pageable pageable |
69 | 68 | ); |
70 | 69 |
|
71 | 70 | @Operation(summary = "문서의 모든 버전 목록 조회") |
72 | | - @ApiResponseExplanations( |
73 | | - success = @ApiSuccessResponseExplanation( |
74 | | - responseClass = DocumentVersionListResponse.class, |
75 | | - description = "조회 성공" |
76 | | - ) |
77 | | - ) |
78 | | - ResponseEntity<ApiResponse<DocumentVersionListResponse>> getAllDocumentVersions( |
| 71 | + @PageableAsQueryParam |
| 72 | + ResponseEntity<ApiResponse<Page<DocumentVersionResponse>>> getAllDocumentVersions( |
79 | 73 | @PathVariable final Long documentId, |
80 | | - @Parameter(hidden = true) @LoginUser final CustomUserDetails principal |
| 74 | + @Parameter(hidden = true) @LoginUser final CustomUserDetails principal, |
| 75 | + @Parameter(hidden = true) Pageable pageable |
81 | 76 | ); |
82 | 77 |
|
83 | 78 | @Operation(summary = "문서 삭제") |
|
0 commit comments