→API 엔드포인트의 작업에 대한 설명을 추가하고 세부 정조를 제공하는 데 사용된다. 주로 @RestController 클래스 내부의 메서드에서 사용된다.
@Operation(summary = "헬스 체크 조회", description = "서버의 작동 여부 확인을 위해 헬스 체크를 조회한다.")
@ApiResponse(responseCode = "200", description = "헬스 체크 조회 성공")
@GetMapping
public ResponseEntity<String> check() {
final String response = healthCheckService.check();
return ResponseEntity.ok(response);
}
@RequestParam → Http 요청 파라미터 값을 편리하게 사용하도록 도와준다.
@PathVariable → path를 뒤에 덧 붙여 그 텍스트를 가져오는 기능 ex) /api/v1/mypay/{o} 이런식으로 쓰이고 이 o를 변수로 가져와 사용이 가능하다