forked from loafle/openapi-generator-original
Add nullability annotations to Java generated clients (#19617)
* issue-1960: Add nullability annotations to Java generated clients Motivations: Have generated clients properly annotated for nullability to be able to check code using them with tools like NullAway Modifications: * Add nullable_var_annotations template to handle nullability annotation on vars * Add pojo templates to use the nullability template * Adapt tests * issue-1960: Add nullability annotations to Java generated clients Modifications: * Run export_docs_generator.sh script to update samples
This commit is contained in:
@@ -33,15 +33,17 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class Bird {
|
||||
public static final String JSON_PROPERTY_SIZE = "size";
|
||||
@javax.annotation.Nullable
|
||||
private String size;
|
||||
|
||||
public static final String JSON_PROPERTY_COLOR = "color";
|
||||
@javax.annotation.Nullable
|
||||
private String color;
|
||||
|
||||
public Bird() {
|
||||
}
|
||||
|
||||
public Bird size(String size) {
|
||||
public Bird size(@javax.annotation.Nullable String size) {
|
||||
|
||||
this.size = size;
|
||||
return this;
|
||||
@@ -62,11 +64,11 @@ public class Bird {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_SIZE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setSize(String size) {
|
||||
public void setSize(@javax.annotation.Nullable String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public Bird color(String color) {
|
||||
public Bird color(@javax.annotation.Nullable String color) {
|
||||
|
||||
this.color = color;
|
||||
return this;
|
||||
@@ -87,7 +89,7 @@ public class Bird {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_COLOR)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setColor(String color) {
|
||||
public void setColor(@javax.annotation.Nullable String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,15 +33,17 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class Category {
|
||||
public static final String JSON_PROPERTY_ID = "id";
|
||||
@javax.annotation.Nullable
|
||||
private Long id;
|
||||
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
@javax.annotation.Nullable
|
||||
private String name;
|
||||
|
||||
public Category() {
|
||||
}
|
||||
|
||||
public Category id(Long id) {
|
||||
public Category id(@javax.annotation.Nullable Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
@@ -62,11 +64,11 @@ public class Category {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setId(Long id) {
|
||||
public void setId(@javax.annotation.Nullable Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Category name(String name) {
|
||||
public Category name(@javax.annotation.Nullable String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
@@ -87,7 +89,7 @@ public class Category {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setName(String name) {
|
||||
public void setName(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,19 +39,22 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class DataQuery extends Query {
|
||||
public static final String JSON_PROPERTY_SUFFIX = "suffix";
|
||||
@javax.annotation.Nullable
|
||||
private String suffix;
|
||||
|
||||
public static final String JSON_PROPERTY_TEXT = "text";
|
||||
@javax.annotation.Nullable
|
||||
private String text;
|
||||
|
||||
public static final String JSON_PROPERTY_DATE = "date";
|
||||
@javax.annotation.Nullable
|
||||
private OffsetDateTime date;
|
||||
|
||||
public DataQuery() {
|
||||
|
||||
}
|
||||
|
||||
public DataQuery suffix(String suffix) {
|
||||
public DataQuery suffix(@javax.annotation.Nullable String suffix) {
|
||||
|
||||
this.suffix = suffix;
|
||||
return this;
|
||||
@@ -72,11 +75,11 @@ public class DataQuery extends Query {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_SUFFIX)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setSuffix(String suffix) {
|
||||
public void setSuffix(@javax.annotation.Nullable String suffix) {
|
||||
this.suffix = suffix;
|
||||
}
|
||||
|
||||
public DataQuery text(String text) {
|
||||
public DataQuery text(@javax.annotation.Nullable String text) {
|
||||
|
||||
this.text = text;
|
||||
return this;
|
||||
@@ -97,11 +100,11 @@ public class DataQuery extends Query {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_TEXT)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setText(String text) {
|
||||
public void setText(@javax.annotation.Nullable String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public DataQuery date(OffsetDateTime date) {
|
||||
public DataQuery date(@javax.annotation.Nullable OffsetDateTime date) {
|
||||
|
||||
this.date = date;
|
||||
return this;
|
||||
@@ -122,18 +125,18 @@ public class DataQuery extends Query {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_DATE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setDate(OffsetDateTime date) {
|
||||
public void setDate(@javax.annotation.Nullable OffsetDateTime date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataQuery id(Long id) {
|
||||
public DataQuery id(@javax.annotation.Nullable Long id) {
|
||||
this.setId(id);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DataQuery outcomes(List<OutcomesEnum> outcomes) {
|
||||
public DataQuery outcomes(@javax.annotation.Nullable List<OutcomesEnum> outcomes) {
|
||||
this.setOutcomes(outcomes);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class DefaultValue {
|
||||
public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT = "array_string_enum_ref_default";
|
||||
@javax.annotation.Nullable
|
||||
private List<StringEnumRef> arrayStringEnumRefDefault = new ArrayList<>(Arrays.asList(StringEnumRef.SUCCESS, StringEnumRef.FAILURE));
|
||||
|
||||
/**
|
||||
@@ -87,30 +88,37 @@ public class DefaultValue {
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT = "array_string_enum_default";
|
||||
@javax.annotation.Nullable
|
||||
private List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault = new ArrayList<>(Arrays.asList(ArrayStringEnumDefaultEnum.SUCCESS, ArrayStringEnumDefaultEnum.FAILURE));
|
||||
|
||||
public static final String JSON_PROPERTY_ARRAY_STRING_DEFAULT = "array_string_default";
|
||||
@javax.annotation.Nullable
|
||||
private List<String> arrayStringDefault = new ArrayList<>(Arrays.asList("failure", "skipped"));
|
||||
|
||||
public static final String JSON_PROPERTY_ARRAY_INTEGER_DEFAULT = "array_integer_default";
|
||||
@javax.annotation.Nullable
|
||||
private List<Integer> arrayIntegerDefault = new ArrayList<>(Arrays.asList(1, 3));
|
||||
|
||||
public static final String JSON_PROPERTY_ARRAY_STRING = "array_string";
|
||||
@javax.annotation.Nullable
|
||||
private List<String> arrayString;
|
||||
|
||||
public static final String JSON_PROPERTY_ARRAY_STRING_NULLABLE = "array_string_nullable";
|
||||
@javax.annotation.Nullable
|
||||
private JsonNullable<List<String>> arrayStringNullable = JsonNullable.<List<String>>undefined();
|
||||
|
||||
public static final String JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE = "array_string_extension_nullable";
|
||||
@javax.annotation.Nullable
|
||||
private JsonNullable<List<String>> arrayStringExtensionNullable = JsonNullable.<List<String>>undefined();
|
||||
|
||||
public static final String JSON_PROPERTY_STRING_NULLABLE = "string_nullable";
|
||||
@javax.annotation.Nullable
|
||||
private JsonNullable<String> stringNullable = JsonNullable.<String>undefined();
|
||||
|
||||
public DefaultValue() {
|
||||
}
|
||||
|
||||
public DefaultValue arrayStringEnumRefDefault(List<StringEnumRef> arrayStringEnumRefDefault) {
|
||||
public DefaultValue arrayStringEnumRefDefault(@javax.annotation.Nullable List<StringEnumRef> arrayStringEnumRefDefault) {
|
||||
|
||||
this.arrayStringEnumRefDefault = arrayStringEnumRefDefault;
|
||||
return this;
|
||||
@@ -139,11 +147,11 @@ public class DefaultValue {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setArrayStringEnumRefDefault(List<StringEnumRef> arrayStringEnumRefDefault) {
|
||||
public void setArrayStringEnumRefDefault(@javax.annotation.Nullable List<StringEnumRef> arrayStringEnumRefDefault) {
|
||||
this.arrayStringEnumRefDefault = arrayStringEnumRefDefault;
|
||||
}
|
||||
|
||||
public DefaultValue arrayStringEnumDefault(List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault) {
|
||||
public DefaultValue arrayStringEnumDefault(@javax.annotation.Nullable List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault) {
|
||||
|
||||
this.arrayStringEnumDefault = arrayStringEnumDefault;
|
||||
return this;
|
||||
@@ -172,11 +180,11 @@ public class DefaultValue {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setArrayStringEnumDefault(List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault) {
|
||||
public void setArrayStringEnumDefault(@javax.annotation.Nullable List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault) {
|
||||
this.arrayStringEnumDefault = arrayStringEnumDefault;
|
||||
}
|
||||
|
||||
public DefaultValue arrayStringDefault(List<String> arrayStringDefault) {
|
||||
public DefaultValue arrayStringDefault(@javax.annotation.Nullable List<String> arrayStringDefault) {
|
||||
|
||||
this.arrayStringDefault = arrayStringDefault;
|
||||
return this;
|
||||
@@ -205,11 +213,11 @@ public class DefaultValue {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_DEFAULT)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setArrayStringDefault(List<String> arrayStringDefault) {
|
||||
public void setArrayStringDefault(@javax.annotation.Nullable List<String> arrayStringDefault) {
|
||||
this.arrayStringDefault = arrayStringDefault;
|
||||
}
|
||||
|
||||
public DefaultValue arrayIntegerDefault(List<Integer> arrayIntegerDefault) {
|
||||
public DefaultValue arrayIntegerDefault(@javax.annotation.Nullable List<Integer> arrayIntegerDefault) {
|
||||
|
||||
this.arrayIntegerDefault = arrayIntegerDefault;
|
||||
return this;
|
||||
@@ -238,11 +246,11 @@ public class DefaultValue {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ARRAY_INTEGER_DEFAULT)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setArrayIntegerDefault(List<Integer> arrayIntegerDefault) {
|
||||
public void setArrayIntegerDefault(@javax.annotation.Nullable List<Integer> arrayIntegerDefault) {
|
||||
this.arrayIntegerDefault = arrayIntegerDefault;
|
||||
}
|
||||
|
||||
public DefaultValue arrayString(List<String> arrayString) {
|
||||
public DefaultValue arrayString(@javax.annotation.Nullable List<String> arrayString) {
|
||||
|
||||
this.arrayString = arrayString;
|
||||
return this;
|
||||
@@ -271,11 +279,11 @@ public class DefaultValue {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ARRAY_STRING)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setArrayString(List<String> arrayString) {
|
||||
public void setArrayString(@javax.annotation.Nullable List<String> arrayString) {
|
||||
this.arrayString = arrayString;
|
||||
}
|
||||
|
||||
public DefaultValue arrayStringNullable(List<String> arrayStringNullable) {
|
||||
public DefaultValue arrayStringNullable(@javax.annotation.Nullable List<String> arrayStringNullable) {
|
||||
this.arrayStringNullable = JsonNullable.<List<String>>of(arrayStringNullable);
|
||||
|
||||
return this;
|
||||
@@ -316,11 +324,11 @@ public class DefaultValue {
|
||||
this.arrayStringNullable = arrayStringNullable;
|
||||
}
|
||||
|
||||
public void setArrayStringNullable(List<String> arrayStringNullable) {
|
||||
public void setArrayStringNullable(@javax.annotation.Nullable List<String> arrayStringNullable) {
|
||||
this.arrayStringNullable = JsonNullable.<List<String>>of(arrayStringNullable);
|
||||
}
|
||||
|
||||
public DefaultValue arrayStringExtensionNullable(List<String> arrayStringExtensionNullable) {
|
||||
public DefaultValue arrayStringExtensionNullable(@javax.annotation.Nullable List<String> arrayStringExtensionNullable) {
|
||||
this.arrayStringExtensionNullable = JsonNullable.<List<String>>of(arrayStringExtensionNullable);
|
||||
|
||||
return this;
|
||||
@@ -361,11 +369,11 @@ public class DefaultValue {
|
||||
this.arrayStringExtensionNullable = arrayStringExtensionNullable;
|
||||
}
|
||||
|
||||
public void setArrayStringExtensionNullable(List<String> arrayStringExtensionNullable) {
|
||||
public void setArrayStringExtensionNullable(@javax.annotation.Nullable List<String> arrayStringExtensionNullable) {
|
||||
this.arrayStringExtensionNullable = JsonNullable.<List<String>>of(arrayStringExtensionNullable);
|
||||
}
|
||||
|
||||
public DefaultValue stringNullable(String stringNullable) {
|
||||
public DefaultValue stringNullable(@javax.annotation.Nullable String stringNullable) {
|
||||
this.stringNullable = JsonNullable.<String>of(stringNullable);
|
||||
|
||||
return this;
|
||||
@@ -394,7 +402,7 @@ public class DefaultValue {
|
||||
this.stringNullable = stringNullable;
|
||||
}
|
||||
|
||||
public void setStringNullable(String stringNullable) {
|
||||
public void setStringNullable(@javax.annotation.Nullable String stringNullable) {
|
||||
this.stringNullable = JsonNullable.<String>of(stringNullable);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,18 +35,21 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class NumberPropertiesOnly {
|
||||
public static final String JSON_PROPERTY_NUMBER = "number";
|
||||
@javax.annotation.Nullable
|
||||
private BigDecimal number;
|
||||
|
||||
public static final String JSON_PROPERTY_FLOAT = "float";
|
||||
@javax.annotation.Nullable
|
||||
private Float _float;
|
||||
|
||||
public static final String JSON_PROPERTY_DOUBLE = "double";
|
||||
@javax.annotation.Nullable
|
||||
private Double _double;
|
||||
|
||||
public NumberPropertiesOnly() {
|
||||
}
|
||||
|
||||
public NumberPropertiesOnly number(BigDecimal number) {
|
||||
public NumberPropertiesOnly number(@javax.annotation.Nullable BigDecimal number) {
|
||||
|
||||
this.number = number;
|
||||
return this;
|
||||
@@ -67,11 +70,11 @@ public class NumberPropertiesOnly {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_NUMBER)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setNumber(BigDecimal number) {
|
||||
public void setNumber(@javax.annotation.Nullable BigDecimal number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public NumberPropertiesOnly _float(Float _float) {
|
||||
public NumberPropertiesOnly _float(@javax.annotation.Nullable Float _float) {
|
||||
|
||||
this._float = _float;
|
||||
return this;
|
||||
@@ -92,11 +95,11 @@ public class NumberPropertiesOnly {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_FLOAT)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setFloat(Float _float) {
|
||||
public void setFloat(@javax.annotation.Nullable Float _float) {
|
||||
this._float = _float;
|
||||
}
|
||||
|
||||
public NumberPropertiesOnly _double(Double _double) {
|
||||
public NumberPropertiesOnly _double(@javax.annotation.Nullable Double _double) {
|
||||
|
||||
this._double = _double;
|
||||
return this;
|
||||
@@ -119,7 +122,7 @@ public class NumberPropertiesOnly {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_DOUBLE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setDouble(Double _double) {
|
||||
public void setDouble(@javax.annotation.Nullable Double _double) {
|
||||
this._double = _double;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,18 +42,23 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class Pet {
|
||||
public static final String JSON_PROPERTY_ID = "id";
|
||||
@javax.annotation.Nullable
|
||||
private Long id;
|
||||
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
@javax.annotation.Nonnull
|
||||
private String name;
|
||||
|
||||
public static final String JSON_PROPERTY_CATEGORY = "category";
|
||||
@javax.annotation.Nullable
|
||||
private Category category;
|
||||
|
||||
public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls";
|
||||
@javax.annotation.Nonnull
|
||||
private List<String> photoUrls;
|
||||
|
||||
public static final String JSON_PROPERTY_TAGS = "tags";
|
||||
@javax.annotation.Nullable
|
||||
private List<Tag> tags;
|
||||
|
||||
/**
|
||||
@@ -94,12 +99,13 @@ public class Pet {
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_STATUS = "status";
|
||||
@javax.annotation.Nullable
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet() {
|
||||
}
|
||||
|
||||
public Pet id(Long id) {
|
||||
public Pet id(@javax.annotation.Nullable Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
@@ -120,11 +126,11 @@ public class Pet {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setId(Long id) {
|
||||
public void setId(@javax.annotation.Nullable Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Pet name(String name) {
|
||||
public Pet name(@javax.annotation.Nonnull String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
@@ -145,11 +151,11 @@ public class Pet {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||
public void setName(String name) {
|
||||
public void setName(@javax.annotation.Nonnull String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Pet category(Category category) {
|
||||
public Pet category(@javax.annotation.Nullable Category category) {
|
||||
|
||||
this.category = category;
|
||||
return this;
|
||||
@@ -170,11 +176,11 @@ public class Pet {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_CATEGORY)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setCategory(Category category) {
|
||||
public void setCategory(@javax.annotation.Nullable Category category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public Pet photoUrls(List<String> photoUrls) {
|
||||
public Pet photoUrls(@javax.annotation.Nonnull List<String> photoUrls) {
|
||||
|
||||
this.photoUrls = photoUrls;
|
||||
return this;
|
||||
@@ -203,11 +209,11 @@ public class Pet {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
|
||||
@JsonInclude(value = JsonInclude.Include.ALWAYS)
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
public void setPhotoUrls(@javax.annotation.Nonnull List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
public Pet tags(List<Tag> tags) {
|
||||
public Pet tags(@javax.annotation.Nullable List<Tag> tags) {
|
||||
|
||||
this.tags = tags;
|
||||
return this;
|
||||
@@ -236,11 +242,11 @@ public class Pet {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_TAGS)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setTags(List<Tag> tags) {
|
||||
public void setTags(@javax.annotation.Nullable List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public Pet status(StatusEnum status) {
|
||||
public Pet status(@javax.annotation.Nullable StatusEnum status) {
|
||||
|
||||
this.status = status;
|
||||
return this;
|
||||
@@ -261,7 +267,7 @@ public class Pet {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_STATUS)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setStatus(StatusEnum status) {
|
||||
public void setStatus(@javax.annotation.Nullable StatusEnum status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class Query {
|
||||
public static final String JSON_PROPERTY_ID = "id";
|
||||
@javax.annotation.Nullable
|
||||
protected Long id;
|
||||
|
||||
/**
|
||||
@@ -76,12 +77,13 @@ public class Query {
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_OUTCOMES = "outcomes";
|
||||
@javax.annotation.Nullable
|
||||
protected List<OutcomesEnum> outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE));
|
||||
|
||||
public Query() {
|
||||
}
|
||||
|
||||
public Query id(Long id) {
|
||||
public Query id(@javax.annotation.Nullable Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
@@ -102,11 +104,11 @@ public class Query {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setId(Long id) {
|
||||
public void setId(@javax.annotation.Nullable Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Query outcomes(List<OutcomesEnum> outcomes) {
|
||||
public Query outcomes(@javax.annotation.Nullable List<OutcomesEnum> outcomes) {
|
||||
|
||||
this.outcomes = outcomes;
|
||||
return this;
|
||||
@@ -135,7 +137,7 @@ public class Query {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_OUTCOMES)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setOutcomes(List<OutcomesEnum> outcomes) {
|
||||
public void setOutcomes(@javax.annotation.Nullable List<OutcomesEnum> outcomes) {
|
||||
this.outcomes = outcomes;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,15 +33,17 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class Tag {
|
||||
public static final String JSON_PROPERTY_ID = "id";
|
||||
@javax.annotation.Nullable
|
||||
private Long id;
|
||||
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
@javax.annotation.Nullable
|
||||
private String name;
|
||||
|
||||
public Tag() {
|
||||
}
|
||||
|
||||
public Tag id(Long id) {
|
||||
public Tag id(@javax.annotation.Nullable Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
@@ -62,11 +64,11 @@ public class Tag {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setId(Long id) {
|
||||
public void setId(@javax.annotation.Nullable Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Tag name(String name) {
|
||||
public Tag name(@javax.annotation.Nullable String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
@@ -87,7 +89,7 @@ public class Tag {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setName(String name) {
|
||||
public void setName(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,12 +33,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class TestFormObjectMultipartRequestMarker {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
@javax.annotation.Nullable
|
||||
private String name;
|
||||
|
||||
public TestFormObjectMultipartRequestMarker() {
|
||||
}
|
||||
|
||||
public TestFormObjectMultipartRequestMarker name(String name) {
|
||||
public TestFormObjectMultipartRequestMarker name(@javax.annotation.Nullable String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
@@ -59,7 +60,7 @@ public class TestFormObjectMultipartRequestMarker {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setName(String name) {
|
||||
public void setName(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,21 +36,25 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {
|
||||
public static final String JSON_PROPERTY_SIZE = "size";
|
||||
@javax.annotation.Nullable
|
||||
private String size;
|
||||
|
||||
public static final String JSON_PROPERTY_COLOR = "color";
|
||||
@javax.annotation.Nullable
|
||||
private String color;
|
||||
|
||||
public static final String JSON_PROPERTY_ID = "id";
|
||||
@javax.annotation.Nullable
|
||||
private Long id;
|
||||
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
@javax.annotation.Nullable
|
||||
private String name;
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
|
||||
}
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(String size) {
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(@javax.annotation.Nullable String size) {
|
||||
|
||||
this.size = size;
|
||||
return this;
|
||||
@@ -71,11 +75,11 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_SIZE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setSize(String size) {
|
||||
public void setSize(@javax.annotation.Nullable String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) {
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(@javax.annotation.Nullable String color) {
|
||||
|
||||
this.color = color;
|
||||
return this;
|
||||
@@ -96,11 +100,11 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_COLOR)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setColor(String color) {
|
||||
public void setColor(@javax.annotation.Nullable String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) {
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(@javax.annotation.Nullable Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
@@ -121,11 +125,11 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setId(Long id) {
|
||||
public void setId(@javax.annotation.Nullable Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) {
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(@javax.annotation.Nullable String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
@@ -146,7 +150,7 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setName(String name) {
|
||||
public void setName(@javax.annotation.Nullable String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,12 +36,13 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0-SNAPSHOT")
|
||||
public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {
|
||||
public static final String JSON_PROPERTY_VALUES = "values";
|
||||
@javax.annotation.Nullable
|
||||
private List<String> values;
|
||||
|
||||
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() {
|
||||
}
|
||||
|
||||
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(List<String> values) {
|
||||
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(@javax.annotation.Nullable List<String> values) {
|
||||
|
||||
this.values = values;
|
||||
return this;
|
||||
@@ -70,7 +71,7 @@ public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_VALUES)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setValues(List<String> values) {
|
||||
public void setValues(@javax.annotation.Nullable List<String> values) {
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user