-
-
Notifications
You must be signed in to change notification settings - Fork 523
Support to customize path #1675
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
Comments
You already have |
Hi, I tried using When I have two methods @GetMapping("/members/{memberNo}")
fun findMember(@PathVariable memberNo: Long, userName: String, age: Int)
@GetMapping("/members/{memberNo}", params = "filter=admin")
fun findAdmin(@PathVariable memberNo: Long, admin : Boolean) I expected to get a document for two paths like this.
But I got a document for one path.
When I try to customize using OpenApiCustomizer, What should I do to be able to customize it as I want? |
What is your expected OpenAPI description, for the code you provided ? |
Actually, it's not OpenAPI's specification yet. |
If you want to customize the path, make sure you put what is exactly your expcted OpenAPI description. Otherwise, we have no way to help you. |
Lines 195 to 205 in f5208eb
I think we can extract @FunctionalInterface
public interface PathCustomizer {
String customize(HandlerMethod handlerMethod, RouterOperation routerOperation, Locale locale);
} And we can create a Lines 382 to 395 in f5208eb
And if there is a |
You are not describing the test case why you need this change. Without these elements, there is no need to insist. |
@seoul-afternoon will make PR for this soon. |
Feel free to propose a PR with the related unit tests. |
I look forward to create each path for each query parameter although it is the same path.
However, the path is overwritten and omitted.
I want to create 4 various paths
/v1/security/credentials?action=changePassword
/v1/security/credentials?action=requestPasswordReset
/v1/security/credentials?action=resetPassword
/v1/security/credentials?action=remindUsername
But I created 1 various path
/v1/security/credentials
I think this is expected behavior for current open api spec.
But several open api spec users have been already experiencing this problem.
And it's been considered for a long time to be reflected in the next version.
In order to solve this problem, I would like to have an extension point to customize path.
I suggest adding
PathCustomizer
.If you don't mind, I'll propose a PR about this.
I hope you consider this plan.
Thanks in advance for answering.
The text was updated successfully, but these errors were encountered: