Skip to content

Conversation

@qmean
Copy link
Contributor

@qmean qmean commented Feb 4, 2025

📌 관련 이슈

✨ PR 세부 내용

구현내용

controller에서 pageable을 받을때 swagger에서 프런트분들이 이해하기 쉽도록 하는 마커 어노테이션 추가

사용방법

	@GetMapping
	@SwaggerPageable
	public ResponseEntity<ApiResponse<GetAlarmDto.Response>> getAlarmList(Pageable pageable, @RequestParam Long userId) {

		GetAlarmDto.Response data = alarmService.getAlarm(pageable, userId);

		return ResponseEntity.ok(ApiResponse.success(data));
	}

위와같이 pageable를 파라미터로 받는 메서드에 @SwaggerPageable 을 추가하시면 됩니다

적용전/적용후 비교

적용전

스크린샷 2025-02-05 오전 1 18 49

적용후

스크린샷 2025-02-05 오전 1 19 17

참고

sort는 받지 않도록 설정했습니다

@qmean qmean added the ✨ feature 새로운 기능을 추가합니다 label Feb 4, 2025
@qmean qmean self-assigned this Feb 4, 2025
@qmean qmean linked an issue Feb 4, 2025 that may be closed by this pull request
@qmean qmean force-pushed the feat/#134/implemnt-marker-pageable-annotation-for-swagger branch from 14e2135 to 66d4fb8 Compare February 4, 2025 17:21
Copy link
Member

@dongjune8931 dongjune8931 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다

@qmean qmean merged commit 52ae23d into develop Feb 4, 2025
1 check passed
@qmean qmean deleted the feat/#134/implemnt-marker-pageable-annotation-for-swagger branch February 4, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature 새로운 기능을 추가합니다

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] swagger 전용 pageable 마커 어노테이션 추가

3 participants