-
Notifications
You must be signed in to change notification settings - Fork 239
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
Add possibility to use custom annotations to detect query parameters #747
Comments
…meters Adds possibility to detect Spring request parameters using custom annotations Adds possibility to detect Spring request body using custom annotations Fixes vojtechhabarta#747 Signed-off-by: Oleksandr Porunov <[email protected]>
Hello, the problem with custom resolvers is that they can do pretty much anything. They can for example get request parameter with any name (different from Java parameter name), convert strings to lists, or even get header instead of request parameter. So I don't think it is in general possible to produce TypeScript description when we don't know what the resolver is doing. |
…meters Adds possibility to detect Spring request parameters using custom annotations Adds possibility to detect Spring request body using custom annotations Fixes vojtechhabarta#747 Signed-off-by: Oleksandr Porunov <[email protected]>
I agree with you that using custom argument resolver is more challenging but at least having a possibility to declare such parameters in typescript helps to resolve the issue partially. |
…meters Adds possibility to detect Spring request parameters using custom annotations Adds possibility to detect Spring request body using custom annotations Fixes vojtechhabarta#747 Signed-off-by: Oleksandr Porunov <[email protected]>
In spring it's possible to use HandlerMethodArgumentResolver which can help to create custom data binders for Spring controllers (https://www.baeldung.com/spring-mvc-custom-data-binder#1-custom-argument-resolver).
For example, it's possible to create some methods which look like:
in
HandlerMethodArgumentResolver
it's possible to describe logic of how exactly those method parameters are going to be bound.It would be great if we could somehow specify such method parameters and be able to generate them in typescript.
The text was updated successfully, but these errors were encountered: