Combine multiple annotations into one to avoid repeating them
问题 I'm working on the implementation of various REST services, using Spring MVC. For documentation, I'm using Swagger. This works nice and the documentation looks good and is really functional. The only problem I have is that the annotations for documentation really crowd the controller classes, especially the error code annotations. Example: @ApiErrors(value = { @ApiError(code = 123, reason = "Reason123"), @ApiError(code = 124, reason = "Reason124"), @ApiError(code = 125, reason = "Reason125"),