forked from loafle/openapi-generator-original
[JAVA] Jersey3 deprecated field only deprecates getter method (#17221)
* Deprecate build and setter methods * Generate samples
This commit is contained in:
@@ -81,6 +81,7 @@ public class ObjectWithDeprecatedFields {
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public ObjectWithDeprecatedFields id(BigDecimal id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
@@ -101,6 +102,7 @@ public class ObjectWithDeprecatedFields {
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setId(BigDecimal id) {
|
||||
@@ -108,6 +110,7 @@ public class ObjectWithDeprecatedFields {
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) {
|
||||
this.deprecatedRef = deprecatedRef;
|
||||
return this;
|
||||
@@ -128,6 +131,7 @@ public class ObjectWithDeprecatedFields {
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
@JsonProperty(JSON_PROPERTY_DEPRECATED_REF)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setDeprecatedRef(DeprecatedObject deprecatedRef) {
|
||||
@@ -135,6 +139,7 @@ public class ObjectWithDeprecatedFields {
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public ObjectWithDeprecatedFields bars(List<String> bars) {
|
||||
this.bars = bars;
|
||||
return this;
|
||||
@@ -163,6 +168,7 @@ public class ObjectWithDeprecatedFields {
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
@JsonProperty(JSON_PROPERTY_BARS)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setBars(List<String> bars) {
|
||||
|
||||
Reference in New Issue
Block a user