【发布时间】:2021-09-06 08:57:05
【问题描述】:
我有两门课
public class Account {
@ApiModelProperty(example = "EUR")
private CurrencyCode currency;
....// public setters and getters
}
和
public class SpecificAccount extends Account {
//Here I need to override the currencie example without redefining the currency field
@ApiModelProperty(example = "USD")
private CurrencyCode currency;
}
我们可以在继承类中使用 @ApiModelProperty 覆盖 swagger discerption/example 吗?
【问题讨论】:
标签: java inheritance swagger swagger-ui