forked from loafle/openapi-generator-original
[Java] add jackson annotations to setters (#9041)
* [Java] add jackson annotations to setters Closes #6856 * [Java] fix conflictiong setter with JsonNullable
This commit is contained in:
@@ -70,6 +70,8 @@ public class ChildSchema extends Parent {
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_PROP1)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setProp1(String prop1) {
|
||||
this.prop1 = prop1;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ public class ChildSchemaAllOf {
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_PROP1)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setProp1(String prop1) {
|
||||
this.prop1 = prop1;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,8 @@ public class MySchemaNameCharacters extends Parent {
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_PROP2)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setProp2(String prop2) {
|
||||
this.prop2 = prop2;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ public class MySchemaNameCharactersAllOf {
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_PROP2)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setProp2(String prop2) {
|
||||
this.prop2 = prop2;
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ public class Parent {
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_OBJECT_TYPE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setObjectType(String objectType) {
|
||||
this.objectType = objectType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user