I have few controller classes that all requires a header param. To document swagger I am adding this @Parameter annotation to all my endpoints:
@Parameter(in = ParameterIn.HEADER, description = "some description", name = "some name", content = @Content(schema = @Schema(allowableValues = {VALUE1, VALUE2, VALUE3, VALUE4})))
@GetMapping
public void method(@RequestHeader .....) {
//some code here
}
Problem is I don't like the idea of repeating the same annotation all over the controller methods. Is there a nice clean solution to have a reusable annotation here?