-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: develop
Are you sure you want to change the base?
[15] 사용자 리뷰 남기기 #53
Conversation
@@ -98,4 +98,10 @@ public GroupedOpenApi shipmentsOpenApi() { | |||
String[] paths = {"/shipments/**"}; | |||
return GroupedOpenApi.builder().group("SHIPMENT API").pathsToMatch(paths).build(); | |||
} | |||
|
|||
@Bean | |||
public GroupedOpenApi reviewsOpenApi() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url이 추가될때마다 매번 관리하는건 번거로운 일인데 매번 추가하지 않고 관리할 수 있는 방법은 없을까요?
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
함수의 이름이 적절할지 한번더 고민해보시면 좋을 것 같습니다.
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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sub package를 구하고 등록하는 형태가 불안정한 것 같아요. package 네이밍 규칙 변경 등, 여러 요소에 따라 깨지기 쉬운 것 같은데, 이를 좀 더 안정적으로 관리할 수 있는 방법은 없을까요?
No description provided.