Hidden fields in swagger ui

后端 未结 2 1363
醉酒成梦
醉酒成梦 2021-01-22 05:50

I am using swagger UI 2.0.23 version and I provision api using json files. I need to send a particular header value to my api using swagger ui but the field should not be visibl

相关标签:
2条回答
  • 2021-01-22 06:17

    This is all you need to add to hide the field in the Swagger ui:

    @ApiModelProperty(hidden = true)
    private List<Reservation> reservations;
    

    That would hide the reservation list from showing.

    0 讨论(0)
  • 2021-01-22 06:20

    You can add a QueryParam and set @ApiParam(access="hide") to it, You won't see it as a query param in the swagger UI.

    0 讨论(0)
提交回复
热议问题