Skip to content

Aliases in parameter annotations on a controller interface are not evaluated [SPR-17460] #21992

Closed
@spring-projects-issues

Description

@spring-projects-issues

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:

Issue Links:

Referenced from: commits c58da71

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions