How to hide endpoints from Swagger documentation with Springfox

前端 未结 5 1517
深忆病人
深忆病人 2021-01-04 12:03

I have a Spring Boot project with next dependency of Springfox:


    io.springfox
    spri         


        
5条回答
  •  無奈伤痛
    2021-01-04 12:48

    One more way is to use @ApiOperation(hidden = true) This can be used at controller/handler level method. E.g.

    @RestController
    public HomeController{
    @ApiOperation(value = "", hidden = true)
        public String getMessage(@RequestParam(value = "msg") final String msg){
            return msg;
        }
    }
    

提交回复
热议问题