mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-06 05:16:10 +00:00
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:
@@ -39,15 +39,17 @@ import org.openapitools.client.ApiClient;
|
||||
@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;
|
||||
}
|
||||
@@ -66,12 +68,12 @@ 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;
|
||||
}
|
||||
@@ -90,7 +92,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,15 +39,17 @@ import org.openapitools.client.ApiClient;
|
||||
@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;
|
||||
}
|
||||
@@ -66,12 +68,12 @@ 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;
|
||||
}
|
||||
@@ -90,7 +92,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,18 +44,21 @@ import org.openapitools.client.ApiClient;
|
||||
@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 Instant date;
|
||||
|
||||
public DataQuery() {
|
||||
}
|
||||
|
||||
public DataQuery suffix(String suffix) {
|
||||
public DataQuery suffix(@javax.annotation.Nullable String suffix) {
|
||||
this.suffix = suffix;
|
||||
return this;
|
||||
}
|
||||
@@ -74,12 +77,12 @@ 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;
|
||||
}
|
||||
@@ -98,12 +101,12 @@ 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(Instant date) {
|
||||
public DataQuery date(@javax.annotation.Nullable Instant date) {
|
||||
this.date = date;
|
||||
return this;
|
||||
}
|
||||
@@ -122,19 +125,19 @@ public class DataQuery extends Query {
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_DATE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setDate(Instant date) {
|
||||
public void setDate(@javax.annotation.Nullable Instant 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;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ import org.openapitools.client.ApiClient;
|
||||
@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));
|
||||
|
||||
/**
|
||||
@@ -92,15 +93,19 @@ 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 = new ArrayList<>();
|
||||
|
||||
public static final String JSON_PROPERTY_ARRAY_STRING_NULLABLE = "array_string_nullable";
|
||||
@@ -115,7 +120,7 @@ public class DefaultValue {
|
||||
public DefaultValue() {
|
||||
}
|
||||
|
||||
public DefaultValue arrayStringEnumRefDefault(List<StringEnumRef> arrayStringEnumRefDefault) {
|
||||
public DefaultValue arrayStringEnumRefDefault(@javax.annotation.Nullable List<StringEnumRef> arrayStringEnumRefDefault) {
|
||||
this.arrayStringEnumRefDefault = arrayStringEnumRefDefault;
|
||||
return this;
|
||||
}
|
||||
@@ -142,12 +147,12 @@ 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;
|
||||
}
|
||||
@@ -174,12 +179,12 @@ 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;
|
||||
}
|
||||
@@ -206,12 +211,12 @@ 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,12 +243,12 @@ 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;
|
||||
}
|
||||
@@ -270,12 +275,12 @@ 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;
|
||||
}
|
||||
@@ -314,12 +319,12 @@ 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;
|
||||
}
|
||||
@@ -358,12 +363,12 @@ 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;
|
||||
}
|
||||
@@ -390,7 +395,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);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,18 +41,21 @@ import org.openapitools.client.ApiClient;
|
||||
@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;
|
||||
}
|
||||
@@ -71,12 +74,12 @@ 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;
|
||||
}
|
||||
@@ -95,12 +98,12 @@ 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;
|
||||
}
|
||||
@@ -121,7 +124,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,18 +47,23 @@ import org.openapitools.client.ApiClient;
|
||||
@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 = new ArrayList<>();
|
||||
|
||||
public static final String JSON_PROPERTY_TAGS = "tags";
|
||||
@javax.annotation.Nullable
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
/**
|
||||
@@ -99,12 +104,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;
|
||||
}
|
||||
@@ -123,12 +129,12 @@ 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;
|
||||
}
|
||||
@@ -147,12 +153,12 @@ 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;
|
||||
}
|
||||
@@ -171,12 +177,12 @@ 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,12 +209,12 @@ 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;
|
||||
}
|
||||
@@ -235,12 +241,12 @@ 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;
|
||||
}
|
||||
@@ -259,7 +265,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ import org.openapitools.client.ApiClient;
|
||||
@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
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@@ -81,12 +82,13 @@ public class Query {
|
||||
}
|
||||
|
||||
public static final String JSON_PROPERTY_OUTCOMES = "outcomes";
|
||||
@javax.annotation.Nullable
|
||||
private 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;
|
||||
}
|
||||
@@ -105,12 +107,12 @@ 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;
|
||||
}
|
||||
@@ -137,7 +139,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,15 +39,17 @@ import org.openapitools.client.ApiClient;
|
||||
@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;
|
||||
}
|
||||
@@ -66,12 +68,12 @@ 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;
|
||||
}
|
||||
@@ -90,7 +92,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -38,12 +38,13 @@ import org.openapitools.client.ApiClient;
|
||||
@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;
|
||||
}
|
||||
@@ -62,7 +63,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;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,21 +41,25 @@ import org.openapitools.client.ApiClient;
|
||||
@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;
|
||||
}
|
||||
@@ -74,12 +78,12 @@ 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;
|
||||
}
|
||||
@@ -98,12 +102,12 @@ 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;
|
||||
}
|
||||
@@ -122,12 +126,12 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,12 +40,13 @@ import org.openapitools.client.ApiClient;
|
||||
@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 = new ArrayList<>();
|
||||
|
||||
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() {
|
||||
}
|
||||
|
||||
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(List<String> values) {
|
||||
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(@javax.annotation.Nullable List<String> values) {
|
||||
this.values = values;
|
||||
return this;
|
||||
}
|
||||
@@ -72,7 +73,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