[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:
Oleh Kurpiak
2021-11-14 16:05:25 +02:00
committed by GitHub
parent 3bdbf0339a
commit e7c3bdacc2
1120 changed files with 2909 additions and 131 deletions

View File

@@ -37,7 +37,7 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> impleme
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesAnyType() {
public AdditionalPropertiesAnyType() {
super();
}

View File

@@ -38,7 +38,7 @@ public class AdditionalPropertiesArray extends HashMap<String, List> implements
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesArray() {
public AdditionalPropertiesArray() {
super();
}

View File

@@ -37,7 +37,7 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> implem
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesBoolean() {
public AdditionalPropertiesBoolean() {
super();
}

View File

@@ -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) {

View File

@@ -37,7 +37,7 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> implem
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesInteger() {
public AdditionalPropertiesInteger() {
super();
}

View File

@@ -38,7 +38,7 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> impl
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesNumber() {
public AdditionalPropertiesNumber() {
super();
}

View File

@@ -37,7 +37,7 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> implements
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesObject() {
public AdditionalPropertiesObject() {
super();
}

View File

@@ -37,7 +37,7 @@ public class AdditionalPropertiesString extends HashMap<String, String> implemen
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesString() {
public AdditionalPropertiesString() {
super();
}

View File

@@ -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();
}

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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();
}

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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();
}

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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();
}

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View 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) {

View File

@@ -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;
}
/**

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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;
}
/**

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {

View File

@@ -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) {