[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

@@ -35,6 +35,8 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesAnyType() {
}
public AdditionalPropertiesAnyType name(String name) {

View File

@@ -36,6 +36,8 @@ public class AdditionalPropertiesArray extends HashMap<String, List> {
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesArray() {
}
public AdditionalPropertiesArray name(String name) {

View File

@@ -35,6 +35,8 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesBoolean() {
}
public AdditionalPropertiesBoolean name(String name) {

View File

@@ -77,6 +77,8 @@ public class AdditionalPropertiesClass {
@SerializedName(SERIALIZED_NAME_ANYTYPE3)
private Object anytype3;
public AdditionalPropertiesClass() {
}
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {

View File

@@ -35,6 +35,8 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesInteger() {
}
public AdditionalPropertiesInteger name(String name) {

View File

@@ -36,6 +36,8 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesNumber() {
}
public AdditionalPropertiesNumber name(String name) {

View File

@@ -35,6 +35,8 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesObject() {
}
public AdditionalPropertiesObject name(String name) {

View File

@@ -35,6 +35,8 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesString() {
}
public AdditionalPropertiesString name(String name) {

View File

@@ -40,7 +40,7 @@ public class Animal {
@SerializedName(SERIALIZED_NAME_COLOR)
private String color = "red";
public Animal() {
public Animal() {
this.className = this.getClass().getSimpleName();
}

View File

@@ -36,6 +36,8 @@ public class ArrayOfArrayOfNumberOnly {
@SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_NUMBER)
private List<List<BigDecimal>> arrayArrayNumber = null;
public ArrayOfArrayOfNumberOnly() {
}
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {

View File

@@ -36,6 +36,8 @@ public class ArrayOfNumberOnly {
@SerializedName(SERIALIZED_NAME_ARRAY_NUMBER)
private List<BigDecimal> arrayNumber = null;
public ArrayOfNumberOnly() {
}
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {

View File

@@ -44,6 +44,8 @@ public class ArrayTest {
@SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_OF_MODEL)
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
public ArrayTest() {
}
public ArrayTest arrayOfString(List<String> arrayOfString) {

View File

@@ -86,7 +86,7 @@ public class BigCat extends Cat {
@SerializedName(SERIALIZED_NAME_KIND)
private KindEnum kind;
public BigCat() {
public BigCat() {
this.className = this.getClass().getSimpleName();
}

View File

@@ -84,6 +84,8 @@ public class BigCatAllOf {
@SerializedName(SERIALIZED_NAME_KIND)
private KindEnum kind;
public BigCatAllOf() {
}
public BigCatAllOf kind(KindEnum kind) {

View File

@@ -53,6 +53,8 @@ public class Capitalization {
@SerializedName(SERIALIZED_NAME_A_T_T_N_A_M_E)
private String ATT_NAME;
public Capitalization() {
}
public Capitalization smallCamel(String smallCamel) {

View File

@@ -36,7 +36,7 @@ public class Cat extends Animal {
@SerializedName(SERIALIZED_NAME_DECLAWED)
private Boolean declawed;
public Cat() {
public Cat() {
this.className = this.getClass().getSimpleName();
}

View File

@@ -33,6 +33,8 @@ public class CatAllOf {
@SerializedName(SERIALIZED_NAME_DECLAWED)
private Boolean declawed;
public CatAllOf() {
}
public CatAllOf declawed(Boolean declawed) {

View File

@@ -37,6 +37,8 @@ public class Category {
@SerializedName(SERIALIZED_NAME_NAME)
private String name = "default-name";
public Category() {
}
public Category id(Long id) {

View File

@@ -34,6 +34,8 @@ public class ClassModel {
@SerializedName(SERIALIZED_NAME_PROPERTY_CLASS)
private String propertyClass;
public ClassModel() {
}
public ClassModel propertyClass(String propertyClass) {

View File

@@ -33,6 +33,8 @@ public class Client {
@SerializedName(SERIALIZED_NAME_CLIENT)
private String client;
public Client() {
}
public Client client(String client) {

View File

@@ -35,7 +35,7 @@ public class Dog extends Animal {
@SerializedName(SERIALIZED_NAME_BREED)
private String breed;
public Dog() {
public Dog() {
this.className = this.getClass().getSimpleName();
}

View File

@@ -33,6 +33,8 @@ public class DogAllOf {
@SerializedName(SERIALIZED_NAME_BREED)
private String breed;
public DogAllOf() {
}
public DogAllOf breed(String breed) {

View File

@@ -133,6 +133,8 @@ public class EnumArrays {
@SerializedName(SERIALIZED_NAME_ARRAY_ENUM)
private List<ArrayEnumEnum> arrayEnum = null;
public EnumArrays() {
}
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {

View File

@@ -242,6 +242,8 @@ public class EnumTest {
@SerializedName(SERIALIZED_NAME_OUTER_ENUM)
private OuterEnum outerEnum;
public EnumTest() {
}
public EnumTest enumString(EnumStringEnum enumString) {

View File

@@ -39,6 +39,8 @@ public class FileSchemaTestClass {
@SerializedName(SERIALIZED_NAME_FILES)
private List<java.io.File> files = null;
public FileSchemaTestClass() {
}
public FileSchemaTestClass file(java.io.File file) {

View File

@@ -90,6 +90,8 @@ public class FormatTest {
@SerializedName(SERIALIZED_NAME_BIG_DECIMAL)
private BigDecimal bigDecimal;
public FormatTest() {
}
public FormatTest integer(Integer integer) {

View File

@@ -37,6 +37,18 @@ public class HasOnlyReadOnly {
@SerializedName(SERIALIZED_NAME_FOO)
private String foo;
public HasOnlyReadOnly() {
}
public HasOnlyReadOnly(
String bar,
String foo
) {
this();
this.bar = bar;
this.foo = foo;
}
/**
* Get bar

View File

@@ -95,6 +95,8 @@ public class MapTest {
@SerializedName(SERIALIZED_NAME_INDIRECT_MAP)
private Map<String, Boolean> indirectMap = null;
public MapTest() {
}
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {

View File

@@ -47,6 +47,8 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
@SerializedName(SERIALIZED_NAME_MAP)
private Map<String, Animal> map = null;
public MixedPropertiesAndAdditionalPropertiesClass() {
}
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {

View File

@@ -38,6 +38,8 @@ public class Model200Response {
@SerializedName(SERIALIZED_NAME_PROPERTY_CLASS)
private String propertyClass;
public Model200Response() {
}
public Model200Response name(Integer name) {

View File

@@ -41,6 +41,8 @@ public class ModelApiResponse {
@SerializedName(SERIALIZED_NAME_MESSAGE)
private String message;
public ModelApiResponse() {
}
public ModelApiResponse code(Integer code) {

View File

@@ -34,6 +34,8 @@ public class ModelReturn {
@SerializedName(SERIALIZED_NAME_RETURN)
private Integer _return;
public ModelReturn() {
}
public ModelReturn _return(Integer _return) {

View File

@@ -46,6 +46,18 @@ public class Name {
@SerializedName(SERIALIZED_NAME_123NUMBER)
private Integer _123number;
public Name() {
}
public Name(
Integer snakeCase,
Integer _123number
) {
this();
this.snakeCase = snakeCase;
this._123number = _123number;
}
public Name name(Integer name) {

View File

@@ -34,6 +34,8 @@ public class NumberOnly {
@SerializedName(SERIALIZED_NAME_JUST_NUMBER)
private BigDecimal justNumber;
public NumberOnly() {
}
public NumberOnly justNumber(BigDecimal justNumber) {

View File

@@ -103,6 +103,8 @@ public class Order {
@SerializedName(SERIALIZED_NAME_COMPLETE)
private Boolean complete = false;
public Order() {
}
public Order id(Long id) {

View File

@@ -42,6 +42,8 @@ public class OuterComposite {
@SerializedName(SERIALIZED_NAME_MY_BOOLEAN)
private Boolean myBoolean;
public OuterComposite() {
}
public OuterComposite myNumber(BigDecimal myNumber) {

View File

@@ -108,6 +108,8 @@ public class Pet {
@SerializedName(SERIALIZED_NAME_STATUS)
private StatusEnum status;
public Pet() {
}
public Pet id(Long id) {

View File

@@ -37,6 +37,16 @@ public class ReadOnlyFirst {
@SerializedName(SERIALIZED_NAME_BAZ)
private String baz;
public ReadOnlyFirst() {
}
public ReadOnlyFirst(
String bar
) {
this();
this.bar = bar;
}
/**
* Get bar

View File

@@ -33,6 +33,8 @@ public class SpecialModelName {
@SerializedName(SERIALIZED_NAME_$_SPECIAL_PROPERTY_NAME)
private Long $specialPropertyName;
public SpecialModelName() {
}
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {

View File

@@ -37,6 +37,8 @@ public class Tag {
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public Tag() {
}
public Tag id(Long id) {

View File

@@ -52,6 +52,8 @@ public class TypeHolderDefault {
@SerializedName(SERIALIZED_NAME_ARRAY_ITEM)
private List<Integer> arrayItem = new ArrayList<Integer>();
public TypeHolderDefault() {
}
public TypeHolderDefault stringItem(String stringItem) {

View File

@@ -56,6 +56,8 @@ public class TypeHolderExample {
@SerializedName(SERIALIZED_NAME_ARRAY_ITEM)
private List<Integer> arrayItem = new ArrayList<Integer>();
public TypeHolderExample() {
}
public TypeHolderExample stringItem(String stringItem) {

View File

@@ -61,6 +61,8 @@ public class User {
@SerializedName(SERIALIZED_NAME_USER_STATUS)
private Integer userStatus;
public User() {
}
public User id(Long id) {

View File

@@ -148,6 +148,8 @@ public class XmlItem {
@SerializedName(SERIALIZED_NAME_PREFIX_NS_WRAPPED_ARRAY)
private List<Integer> prefixNsWrappedArray = null;
public XmlItem() {
}
public XmlItem attributeString(String attributeString) {