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

[15] 사용자 리뷰 남기기 #53

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

ohsuha
Copy link
Collaborator

@ohsuha ohsuha commented Nov 4, 2024

No description provided.

@ohsuha ohsuha linked an issue Nov 4, 2024 that may be closed by this pull request
@@ -98,4 +98,10 @@ public GroupedOpenApi shipmentsOpenApi() {
String[] paths = {"/shipments/**"};
return GroupedOpenApi.builder().group("SHIPMENT API").pathsToMatch(paths).build();
}

@Bean
public GroupedOpenApi reviewsOpenApi() {

Choose a reason for hiding this comment

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

url이 추가될때마다 매번 관리하는건 번거로운 일인데 매번 추가하지 않고 관리할 수 있는 방법은 없을까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

representation 하위에 있는 패키지의 controller 들을 자동으로 등록하는 방식으로 수정했습니다!

String[] paths = {"/orders/**"};
return GroupedOpenApi.builder().group("ORDER API").pathsToMatch(paths).build();
}
private Set<String> findSubPackages(String basePackage) {

Choose a reason for hiding this comment

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

함수의 이름이 적절할지 한번더 고민해보시면 좋을 것 같습니다.

Comment on lines 55 to 61
public GroupedOpenApi partnerOpenApi() {
String[] paths = {"/partners/**"};
return GroupedOpenApi.builder().group("PARTNER API").pathsToMatch(paths).build();
}
Set<String> subPackages = findSubPackages(BASE_PACKAGE);

@Bean
public GroupedOpenApi productOpenApi() {
String[] paths = {"/products/**"};
return GroupedOpenApi.builder().group("PRODUCT API").pathsToMatch(paths).build();
}
for (String pkg : subPackages) {
String groupName = pkg.substring(pkg.lastIndexOf('.') + 1).toUpperCase() + " API";

Choose a reason for hiding this comment

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

sub package를 구하고 등록하는 형태가 불안정한 것 같아요. package 네이밍 규칙 변경 등, 여러 요소에 따라 깨지기 쉬운 것 같은데, 이를 좀 더 안정적으로 관리할 수 있는 방법은 없을까요?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

일반 회원 : 리뷰 작성
2 participants