How to DRY when using Swagger UI and the ApiResponses annotations with Java Spring endpoints?
问题 I like Swagger because it makes your apis very user friendly. I use Swagger annotations like @ApiParam @ApiResponse | @ApiResponses @ApiOperation Others On endpoints, query params, request params, request body and so on. I like to keep my POJO classes clean and in general I try my best to follow DRY rule however, when it comes to swagger I noticed that I keep repeating myself over and over as shown below @ApiOperation(value = "Retrieve object by id") @ApiResponses(value = { @ApiResponse(code