In my annotations, hidden = true doesn't work if I combine it with other annotations like Xml annotations. For example
@XmlElementWrapper(name="order_specials")
@XmlElement(name="order_special")
@ApiModelProperty(hidden = true)
public List<SpecialOrderItem> getOrder_specials() {
return order_specials;
}
the List variable "order_specials" should not be displayed in the swagger docs but it is. When I remove the xml annotations and make it
@ApiModelProperty(hidden = true)
public List<SpecialOrderItem> getOrder_specials() {
return order_specials;
}
it works properly. Weirdly I also tried
@XmlElementWrapper(name="order_specials")
@XmlElement(name="order_special")
@ApiModelProperty(hidden = true, value = "check")
public List<SpecialOrderItem> getOrder_specials() {
return order_specials;
}
This displays value as "check" in swagger doc, but doesn't hide the variable. Any idea/solution?