0

I would like to customize the swaggerUI with some custom messages. And i am able to create custom messages as below

@ApiOperation(value    = "Add a new car to the inventory", 
                nickname = "addCar", 
                response = String.class, 
                responseContainer = "String")
  @ApiResponses(value = {
                  @ApiResponse(code = 200, message = "Car Added Successfully", 
                               response = String.class, responseContainer = "String"),
                  @ApiResponse(code = 405, message = "Invalid input") })

But it makes my controller looks really clumsy. Is there any way to customize it without make the controller so noisy.

Thanks

  • What exactly do you mean by "customize Swagger UI with custom messages"? Do you mean adding descriptions for operations/parameters/responses? Or something else? – Helen Jan 19 '23 at 11:06
  • yeah exactly, Adding description,title,summary,tags and configure response(Multiple response) ,configure how the request should be given. –  Jan 19 '23 at 14:15

0 Answers0