mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-07 20:56:11 +00:00
[Java] fix deserialization of readonly properties (#10113)
* [Java] fix deserialization of readonly properties * [Java] fix deserialization of readonly properties * [Java] fix deserialization of readonly properties * [Java] fix deserialization of readonly properties
This commit is contained in:
@@ -37,7 +37,7 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> impleme
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesAnyType() {
|
||||
public AdditionalPropertiesAnyType() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class AdditionalPropertiesArray extends HashMap<String, List> implements
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesArray() {
|
||||
public AdditionalPropertiesArray() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implem
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesBoolean() {
|
||||
public AdditionalPropertiesBoolean() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public class AdditionalPropertiesClass implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_ANYTYPE3)
|
||||
private Object anytype3;
|
||||
|
||||
public AdditionalPropertiesClass() {
|
||||
public AdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> implem
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesInteger() {
|
||||
public AdditionalPropertiesInteger() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> impl
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesNumber() {
|
||||
public AdditionalPropertiesNumber() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> implements
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesObject() {
|
||||
public AdditionalPropertiesObject() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class AdditionalPropertiesString extends HashMap<String, String> implemen
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesString() {
|
||||
public AdditionalPropertiesString() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Animal implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_COLOR)
|
||||
private String color = "red";
|
||||
|
||||
public Animal() {
|
||||
public Animal() {
|
||||
this.className = this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ArrayOfArrayOfNumberOnly implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_NUMBER)
|
||||
private List<List<BigDecimal>> arrayArrayNumber = null;
|
||||
|
||||
public ArrayOfArrayOfNumberOnly() {
|
||||
public ArrayOfArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ArrayOfNumberOnly implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_NUMBER)
|
||||
private List<BigDecimal> arrayNumber = null;
|
||||
|
||||
public ArrayOfNumberOnly() {
|
||||
public ArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ArrayTest implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_OF_MODEL)
|
||||
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
|
||||
|
||||
public ArrayTest() {
|
||||
public ArrayTest() {
|
||||
}
|
||||
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
|
||||
@@ -88,7 +88,7 @@ public class BigCat extends Cat implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_KIND)
|
||||
private KindEnum kind;
|
||||
|
||||
public BigCat() {
|
||||
public BigCat() {
|
||||
super();
|
||||
this.className = this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public class BigCatAllOf implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_KIND)
|
||||
private KindEnum kind;
|
||||
|
||||
public BigCatAllOf() {
|
||||
public BigCatAllOf() {
|
||||
}
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Capitalization implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_A_T_T_N_A_M_E)
|
||||
private String ATT_NAME;
|
||||
|
||||
public Capitalization() {
|
||||
public Capitalization() {
|
||||
}
|
||||
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class Cat extends Animal implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_DECLAWED)
|
||||
private Boolean declawed;
|
||||
|
||||
public Cat() {
|
||||
public Cat() {
|
||||
super();
|
||||
this.className = this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class CatAllOf implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_DECLAWED)
|
||||
private Boolean declawed;
|
||||
|
||||
public CatAllOf() {
|
||||
public CatAllOf() {
|
||||
}
|
||||
|
||||
public CatAllOf declawed(Boolean declawed) {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Category implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name = "default-name";
|
||||
|
||||
public Category() {
|
||||
public Category() {
|
||||
}
|
||||
|
||||
public Category id(Long id) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ClassModel implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_PROPERTY_CLASS)
|
||||
private String propertyClass;
|
||||
|
||||
public ClassModel() {
|
||||
public ClassModel() {
|
||||
}
|
||||
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Client implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_CLIENT)
|
||||
private String client;
|
||||
|
||||
public Client() {
|
||||
public Client() {
|
||||
}
|
||||
|
||||
public Client client(String client) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Dog extends Animal implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_BREED)
|
||||
private String breed;
|
||||
|
||||
public Dog() {
|
||||
public Dog() {
|
||||
super();
|
||||
this.className = this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class DogAllOf implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_BREED)
|
||||
private String breed;
|
||||
|
||||
public DogAllOf() {
|
||||
public DogAllOf() {
|
||||
}
|
||||
|
||||
public DogAllOf breed(String breed) {
|
||||
|
||||
@@ -135,7 +135,7 @@ public class EnumArrays implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ENUM)
|
||||
private List<ArrayEnumEnum> arrayEnum = null;
|
||||
|
||||
public EnumArrays() {
|
||||
public EnumArrays() {
|
||||
}
|
||||
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
|
||||
@@ -244,7 +244,7 @@ public class EnumTest implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_OUTER_ENUM)
|
||||
private OuterEnum outerEnum;
|
||||
|
||||
public EnumTest() {
|
||||
public EnumTest() {
|
||||
}
|
||||
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class FileSchemaTestClass implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_FILES)
|
||||
private List<java.io.File> files = null;
|
||||
|
||||
public FileSchemaTestClass() {
|
||||
public FileSchemaTestClass() {
|
||||
}
|
||||
|
||||
public FileSchemaTestClass file(java.io.File file) {
|
||||
|
||||
@@ -92,7 +92,7 @@ public class FormatTest implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_BIG_DECIMAL)
|
||||
private BigDecimal bigDecimal;
|
||||
|
||||
public FormatTest() {
|
||||
public FormatTest() {
|
||||
}
|
||||
|
||||
public FormatTest integer(Integer integer) {
|
||||
|
||||
@@ -39,7 +39,17 @@ public class HasOnlyReadOnly implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_FOO)
|
||||
private String foo;
|
||||
|
||||
public HasOnlyReadOnly() {
|
||||
public HasOnlyReadOnly() {
|
||||
}
|
||||
|
||||
|
||||
public HasOnlyReadOnly(
|
||||
String bar,
|
||||
String foo
|
||||
) {
|
||||
this();
|
||||
this.bar = bar;
|
||||
this.foo = foo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -97,7 +97,7 @@ public class MapTest implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_INDIRECT_MAP)
|
||||
private Map<String, Boolean> indirectMap = null;
|
||||
|
||||
public MapTest() {
|
||||
public MapTest() {
|
||||
}
|
||||
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_MAP)
|
||||
private Map<String, Animal> map = null;
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Model200Response implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_PROPERTY_CLASS)
|
||||
private String propertyClass;
|
||||
|
||||
public Model200Response() {
|
||||
public Model200Response() {
|
||||
}
|
||||
|
||||
public Model200Response name(Integer name) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ModelApiResponse implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_MESSAGE)
|
||||
private String message;
|
||||
|
||||
public ModelApiResponse() {
|
||||
public ModelApiResponse() {
|
||||
}
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ModelReturn implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_RETURN)
|
||||
private Integer _return;
|
||||
|
||||
public ModelReturn() {
|
||||
public ModelReturn() {
|
||||
}
|
||||
|
||||
public ModelReturn _return(Integer _return) {
|
||||
|
||||
@@ -48,7 +48,17 @@ public class Name implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_123NUMBER)
|
||||
private Integer _123number;
|
||||
|
||||
public Name() {
|
||||
public Name() {
|
||||
}
|
||||
|
||||
|
||||
public Name(
|
||||
Integer snakeCase,
|
||||
Integer _123number
|
||||
) {
|
||||
this();
|
||||
this.snakeCase = snakeCase;
|
||||
this._123number = _123number;
|
||||
}
|
||||
|
||||
public Name name(Integer name) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class NumberOnly implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_JUST_NUMBER)
|
||||
private BigDecimal justNumber;
|
||||
|
||||
public NumberOnly() {
|
||||
public NumberOnly() {
|
||||
}
|
||||
|
||||
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||
|
||||
@@ -105,7 +105,7 @@ public class Order implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_COMPLETE)
|
||||
private Boolean complete = false;
|
||||
|
||||
public Order() {
|
||||
public Order() {
|
||||
}
|
||||
|
||||
public Order id(Long id) {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class OuterComposite implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_MY_BOOLEAN)
|
||||
private Boolean myBoolean;
|
||||
|
||||
public OuterComposite() {
|
||||
public OuterComposite() {
|
||||
}
|
||||
|
||||
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||
|
||||
@@ -110,7 +110,7 @@ public class Pet implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_STATUS)
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet() {
|
||||
public Pet() {
|
||||
}
|
||||
|
||||
public Pet id(Long id) {
|
||||
|
||||
@@ -39,7 +39,15 @@ public class ReadOnlyFirst implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_BAZ)
|
||||
private String baz;
|
||||
|
||||
public ReadOnlyFirst() {
|
||||
public ReadOnlyFirst() {
|
||||
}
|
||||
|
||||
|
||||
public ReadOnlyFirst(
|
||||
String bar
|
||||
) {
|
||||
this();
|
||||
this.bar = bar;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,7 @@ public class SpecialModelName implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_$_SPECIAL_PROPERTY_NAME)
|
||||
private Long $specialPropertyName;
|
||||
|
||||
public SpecialModelName() {
|
||||
public SpecialModelName() {
|
||||
}
|
||||
|
||||
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Tag implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public Tag() {
|
||||
public Tag() {
|
||||
}
|
||||
|
||||
public Tag id(Long id) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class TypeHolderDefault implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ITEM)
|
||||
private List<Integer> arrayItem = new ArrayList<Integer>();
|
||||
|
||||
public TypeHolderDefault() {
|
||||
public TypeHolderDefault() {
|
||||
}
|
||||
|
||||
public TypeHolderDefault stringItem(String stringItem) {
|
||||
|
||||
@@ -58,7 +58,7 @@ public class TypeHolderExample implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ITEM)
|
||||
private List<Integer> arrayItem = new ArrayList<Integer>();
|
||||
|
||||
public TypeHolderExample() {
|
||||
public TypeHolderExample() {
|
||||
}
|
||||
|
||||
public TypeHolderExample stringItem(String stringItem) {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class User implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_USER_STATUS)
|
||||
private Integer userStatus;
|
||||
|
||||
public User() {
|
||||
public User() {
|
||||
}
|
||||
|
||||
public User id(Long id) {
|
||||
|
||||
@@ -150,7 +150,7 @@ public class XmlItem implements Parcelable {
|
||||
@SerializedName(SERIALIZED_NAME_PREFIX_NS_WRAPPED_ARRAY)
|
||||
private List<Integer> prefixNsWrappedArray = null;
|
||||
|
||||
public XmlItem() {
|
||||
public XmlItem() {
|
||||
}
|
||||
|
||||
public XmlItem attributeString(String attributeString) {
|
||||
|
||||
Reference in New Issue
Block a user