Springfox → OpenAPI로 라이브러리 및 버전 변경
Springfox Boot 버전을 사용하려 했으나 Spring Data Rest API와의 충돌로 인해 해당 의존성을 없애지 않는 한 해결 방법이 없을 것으로 보여짐.
//Springfox
@Api(tags = "모임 유저 관리 API")
@ApiOperation(value = "메인화면 - 모임 리스트 조회")
@GetMapping("/group/main/list")
public GroupResponseDTO findByMain(
@ApiParam(value = "검색어") @RequestParam(required = false) String query,
@ApiParam(value = "SortKey") @RequestParam(required = false, defaultValue = "LATEST") Sort sort,
@ApiParam(required = false) @RequestHeader(value = "Authorization", defaultValue = "") String authorization,
@PageableDefault(page = 0, size = 5) Pageable pageable
) {
return groupService.findByMain(query, sort, authorization, pageable);
}
//OpenAPI
@Tag(name = "네임", description = "설명")
@Operation(summary = "모임 생성", description = "모임 생성 시 사용")
@Operation(summary = "회원 조회", description = "id를 이용하여 user 레코드를 조회합니다.", responses = {
@ApiResponse(responseCode = "200", description = "회원 조회 성공", content = @Content(schema = @Schema(implementation = UserResponse.class))),
@ApiResponse(responseCode = "404", description = "존재하지 않는 리소스 접근", content = @Content(schema = @Schema(implementation = ErrorResponse.class))) })
public ResponseEntity<? extends BasicResponse> select(
@Parameter(name = "id", description = "user 의 id", in = ParameterIn.PATH) @PathVariable("id") long id) {
...
}