Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[refactor] #276 - Swagger의 use-fqn 설정을 false로 변경 #277

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

hoonyworld
Copy link
Member

@hoonyworld hoonyworld commented Dec 2, 2024

Related issue 🛠

Work Description ✏️

Trouble Shooting ⚽️

Related ScreenShot 📷

image
package com.beat.domain.booking.application.dto;

import java.util.List;

public record TicketRefundRequest(
	Long performanceId,
	List<Booking> bookingList
) {
	public static TicketRefundRequest of(Long performanceId, List<Booking> bookingList) {
		return new TicketRefundRequest(performanceId, bookingList);
	}

	public record Booking(
		long bookingId
	) {
	}
}
  • Booking이 nested DTO인데, use-fqn을 false로 변경해도 Swagger의 schema에 인식되는 것을 확인할 수 있습니다.

Uncompleted Tasks 😅

To Reviewers 📢

  • record는 내부적으로 항상 static으로 동작합니다.
  • 즉, 내부 클래스(Booking)를 record로 정의하면, 기본적으로 static 클래스가 되기 때문에, static을 명시적으로 붙이지 않아도 이미 static이 적용된 것처럼 동작합니다.
  • 따라서 nested record의 static을 삭제하였습니다!

Copy link
Collaborator

@hyerinhwang-sailin hyerinhwang-sailin left a comment

Choose a reason for hiding this comment

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

LGTM~

@hoonyworld hoonyworld merged commit 8e81a1f into develop Dec 2, 2024
1 check passed
@hoonyworld hoonyworld deleted the refactor/#276 branch January 13, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[refactor] Swagger use-fqn true에서 false로 변경
2 participants