I am using the spring-fox2 @ApiImplicitParam
annotation to make the swagger-ui show a box for including an Authorization header with a request:
@ApiImplicitParams({
@ApiImplicitParam(
name="Authorization",
value="authorization header containing the bearer token",
paramType = "header"
)
})
public void someControllerMethod() {
...
}
This works fine, but I need this authorization header for each method in the controller. Copying and pasting this is code smell. Can I define some kind of shortcut annotation for this? Is there a different way of telling swagger-ui to create an input field for the authorization header?
Thanks!