Description
Bogdan Zafirov opened SPR-17460 and commented
The problem is explained in this Stack Overflow answer: https://stackoverflow.com/a/8005644. As pointed out in the comment to this answer, this is "problem" is already solved in other frameworks such as Jersey.
The goal would be Spring Framework to consider/evaluate the annotations on interface methods (e.g. public void getUser(@RequestParam
("user-id")), so a developer doesn't have to define the annotations in the implementing class again.
By generating a server implementation from a OAS3 contract (e.g. https://github.com/OpenAPITools/openapi-generator) one can easily face this problem, since the annotations from the generated code (a Java Interface) will not be evaluated on a HTTP call.
Affects: 5.1.2
Attachments:
- rest-annotations.zip (69.61 kB)
Issue Links:
- Enable REST controller method parameter annotations on an interface [SPR-11055] #15682 Enable REST controller method parameter annotations on an interface
Referenced from: commits c58da71