We have two versions of Class XXX. In the version one it includes property x and excludes property y and in the second version x is excluded and y is included.
I'm not able to do that as I can not pass parameters to hidden property it expects a contsant expression.
This is the sample code I use, Here quantity is xx.
@ApiModelProperty(dataType = "Float", required = false, notes = "Item Sequence", position = 5, hidden = this.isOpenMapping)
public Float getQuantity() {
return quantity;
}
this.isOpenMapping is class attribute to distinguish whether version one or two.
How to fix this? If you need any more information please let me know.