Skip to content

Add possibility to use custom annotations to detect query parameters #747

Open
@porunov

Description

@porunov

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:

@RequestMapping(value = "/hello/{id}/world", method = RequestMethod.GET)
public ResponseEntity<GetResponse> getMethod(@PathVariable String id, 
                                             @MyCustomQueryParameter Set<String> customQueryParameter,
                                             @MyCustomQueryParameter Integer customHeaderParameter) {
    return null;
}

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions