forked from loafle/openapi-generator-original
fix issue when discriminator property is an enum string (#13001)
This commit is contained in:
@@ -53,7 +53,7 @@ public class AdditionalPropertiesAnyType {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesAnyType() {
|
||||
public AdditionalPropertiesAnyType() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesAnyType name(String name) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class AdditionalPropertiesArray {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesArray() {
|
||||
public AdditionalPropertiesArray() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesArray name(String name) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AdditionalPropertiesBoolean {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesBoolean() {
|
||||
public AdditionalPropertiesBoolean() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesBoolean name(String name) {
|
||||
|
||||
@@ -97,7 +97,7 @@ public class AdditionalPropertiesClass {
|
||||
@SerializedName(SERIALIZED_NAME_ANYTYPE3)
|
||||
private Object anytype3;
|
||||
|
||||
public AdditionalPropertiesClass() {
|
||||
public AdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AdditionalPropertiesInteger {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesInteger() {
|
||||
public AdditionalPropertiesInteger() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesInteger name(String name) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class AdditionalPropertiesNumber {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesNumber() {
|
||||
public AdditionalPropertiesNumber() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesNumber name(String name) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class AdditionalPropertiesObject {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesObject() {
|
||||
public AdditionalPropertiesObject() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesObject name(String name) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class AdditionalPropertiesString {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesString() {
|
||||
public AdditionalPropertiesString() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesString name(String name) {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class Animal {
|
||||
@SerializedName(SERIALIZED_NAME_COLOR)
|
||||
private String color = "red";
|
||||
|
||||
public Animal() {
|
||||
public Animal() {
|
||||
this.className = this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_NUMBER)
|
||||
private List<List<BigDecimal>> arrayArrayNumber = null;
|
||||
|
||||
public ArrayOfArrayOfNumberOnly() {
|
||||
public ArrayOfArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ArrayOfNumberOnly {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_NUMBER)
|
||||
private List<BigDecimal> arrayNumber = null;
|
||||
|
||||
public ArrayOfNumberOnly() {
|
||||
public ArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
|
||||
@@ -64,7 +64,7 @@ public class ArrayTest {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_OF_MODEL)
|
||||
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
|
||||
|
||||
public ArrayTest() {
|
||||
public ArrayTest() {
|
||||
}
|
||||
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
|
||||
@@ -105,7 +105,7 @@ public class BigCat extends Cat {
|
||||
@SerializedName(SERIALIZED_NAME_KIND)
|
||||
private KindEnum kind;
|
||||
|
||||
public BigCat() {
|
||||
public BigCat() {
|
||||
this.className = this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public class BigCatAllOf {
|
||||
@SerializedName(SERIALIZED_NAME_KIND)
|
||||
private KindEnum kind;
|
||||
|
||||
public BigCatAllOf() {
|
||||
public BigCatAllOf() {
|
||||
}
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
@@ -73,7 +73,7 @@ public class Capitalization {
|
||||
@SerializedName(SERIALIZED_NAME_A_T_T_N_A_M_E)
|
||||
private String ATT_NAME;
|
||||
|
||||
public Capitalization() {
|
||||
public Capitalization() {
|
||||
}
|
||||
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
|
||||
@@ -55,7 +55,7 @@ public class Cat extends Animal {
|
||||
@SerializedName(SERIALIZED_NAME_DECLAWED)
|
||||
private Boolean declawed;
|
||||
|
||||
public Cat() {
|
||||
public Cat() {
|
||||
this.className = this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class CatAllOf {
|
||||
@SerializedName(SERIALIZED_NAME_DECLAWED)
|
||||
private Boolean declawed;
|
||||
|
||||
public CatAllOf() {
|
||||
public CatAllOf() {
|
||||
}
|
||||
|
||||
public CatAllOf declawed(Boolean declawed) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class Category {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name = "default-name";
|
||||
|
||||
public Category() {
|
||||
public Category() {
|
||||
}
|
||||
|
||||
public Category id(Long id) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ClassModel {
|
||||
@SerializedName(SERIALIZED_NAME_PROPERTY_CLASS)
|
||||
private String propertyClass;
|
||||
|
||||
public ClassModel() {
|
||||
public ClassModel() {
|
||||
}
|
||||
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Client {
|
||||
@SerializedName(SERIALIZED_NAME_CLIENT)
|
||||
private String client;
|
||||
|
||||
public Client() {
|
||||
public Client() {
|
||||
}
|
||||
|
||||
public Client client(String client) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class Dog extends Animal {
|
||||
@SerializedName(SERIALIZED_NAME_BREED)
|
||||
private String breed;
|
||||
|
||||
public Dog() {
|
||||
public Dog() {
|
||||
this.className = this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class DogAllOf {
|
||||
@SerializedName(SERIALIZED_NAME_BREED)
|
||||
private String breed;
|
||||
|
||||
public DogAllOf() {
|
||||
public DogAllOf() {
|
||||
}
|
||||
|
||||
public DogAllOf breed(String breed) {
|
||||
|
||||
@@ -153,7 +153,7 @@ public class EnumArrays {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ENUM)
|
||||
private List<ArrayEnumEnum> arrayEnum = null;
|
||||
|
||||
public EnumArrays() {
|
||||
public EnumArrays() {
|
||||
}
|
||||
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
|
||||
@@ -262,7 +262,7 @@ public class EnumTest {
|
||||
@SerializedName(SERIALIZED_NAME_OUTER_ENUM)
|
||||
private OuterEnum outerEnum;
|
||||
|
||||
public EnumTest() {
|
||||
public EnumTest() {
|
||||
}
|
||||
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
|
||||
@@ -60,7 +60,7 @@ public class FileSchemaTestClass {
|
||||
@SerializedName(SERIALIZED_NAME_FILES)
|
||||
private List<ModelFile> files = null;
|
||||
|
||||
public FileSchemaTestClass() {
|
||||
public FileSchemaTestClass() {
|
||||
}
|
||||
|
||||
public FileSchemaTestClass _file(ModelFile _file) {
|
||||
|
||||
@@ -110,7 +110,7 @@ public class FormatTest {
|
||||
@SerializedName(SERIALIZED_NAME_BIG_DECIMAL)
|
||||
private BigDecimal bigDecimal;
|
||||
|
||||
public FormatTest() {
|
||||
public FormatTest() {
|
||||
}
|
||||
|
||||
public FormatTest integer(Integer integer) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class HasOnlyReadOnly {
|
||||
@SerializedName(SERIALIZED_NAME_FOO)
|
||||
private String foo;
|
||||
|
||||
public HasOnlyReadOnly() {
|
||||
public HasOnlyReadOnly() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public class MapTest {
|
||||
@SerializedName(SERIALIZED_NAME_INDIRECT_MAP)
|
||||
private Map<String, Boolean> indirectMap = null;
|
||||
|
||||
public MapTest() {
|
||||
public MapTest() {
|
||||
}
|
||||
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
@SerializedName(SERIALIZED_NAME_MAP)
|
||||
private Map<String, Animal> map = null;
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||
|
||||
@@ -58,7 +58,7 @@ public class Model200Response {
|
||||
@SerializedName(SERIALIZED_NAME_PROPERTY_CLASS)
|
||||
private String propertyClass;
|
||||
|
||||
public Model200Response() {
|
||||
public Model200Response() {
|
||||
}
|
||||
|
||||
public Model200Response name(Integer name) {
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ModelApiResponse {
|
||||
@SerializedName(SERIALIZED_NAME_MESSAGE)
|
||||
private String message;
|
||||
|
||||
public ModelApiResponse() {
|
||||
public ModelApiResponse() {
|
||||
}
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ModelFile {
|
||||
@SerializedName(SERIALIZED_NAME_SOURCE_U_R_I)
|
||||
private String sourceURI;
|
||||
|
||||
public ModelFile() {
|
||||
public ModelFile() {
|
||||
}
|
||||
|
||||
public ModelFile sourceURI(String sourceURI) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ModelList {
|
||||
@SerializedName(SERIALIZED_NAME_123LIST)
|
||||
private String _123list;
|
||||
|
||||
public ModelList() {
|
||||
public ModelList() {
|
||||
}
|
||||
|
||||
public ModelList _123list(String _123list) {
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ModelReturn {
|
||||
@SerializedName(SERIALIZED_NAME_RETURN)
|
||||
private Integer _return;
|
||||
|
||||
public ModelReturn() {
|
||||
public ModelReturn() {
|
||||
}
|
||||
|
||||
public ModelReturn _return(Integer _return) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class Name {
|
||||
@SerializedName(SERIALIZED_NAME_123NUMBER)
|
||||
private Integer _123number;
|
||||
|
||||
public Name() {
|
||||
public Name() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class NumberOnly {
|
||||
@SerializedName(SERIALIZED_NAME_JUST_NUMBER)
|
||||
private BigDecimal justNumber;
|
||||
|
||||
public NumberOnly() {
|
||||
public NumberOnly() {
|
||||
}
|
||||
|
||||
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||
|
||||
@@ -123,7 +123,7 @@ public class Order {
|
||||
@SerializedName(SERIALIZED_NAME_COMPLETE)
|
||||
private Boolean complete = false;
|
||||
|
||||
public Order() {
|
||||
public Order() {
|
||||
}
|
||||
|
||||
public Order id(Long id) {
|
||||
|
||||
@@ -62,7 +62,7 @@ public class OuterComposite {
|
||||
@SerializedName(SERIALIZED_NAME_MY_BOOLEAN)
|
||||
private Boolean myBoolean;
|
||||
|
||||
public OuterComposite() {
|
||||
public OuterComposite() {
|
||||
}
|
||||
|
||||
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||
|
||||
@@ -128,7 +128,7 @@ public class Pet {
|
||||
@SerializedName(SERIALIZED_NAME_STATUS)
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet() {
|
||||
public Pet() {
|
||||
}
|
||||
|
||||
public Pet id(Long id) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ReadOnlyFirst {
|
||||
@SerializedName(SERIALIZED_NAME_BAZ)
|
||||
private String baz;
|
||||
|
||||
public ReadOnlyFirst() {
|
||||
public ReadOnlyFirst() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class SpecialModelName {
|
||||
@SerializedName(SERIALIZED_NAME_$_SPECIAL_PROPERTY_NAME)
|
||||
private Long $specialPropertyName;
|
||||
|
||||
public SpecialModelName() {
|
||||
public SpecialModelName() {
|
||||
}
|
||||
|
||||
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class Tag {
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public Tag() {
|
||||
public Tag() {
|
||||
}
|
||||
|
||||
public Tag id(Long id) {
|
||||
|
||||
@@ -72,7 +72,7 @@ public class TypeHolderDefault {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ITEM)
|
||||
private List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderDefault() {
|
||||
public TypeHolderDefault() {
|
||||
}
|
||||
|
||||
public TypeHolderDefault stringItem(String stringItem) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public class TypeHolderExample {
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_ITEM)
|
||||
private List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderExample() {
|
||||
public TypeHolderExample() {
|
||||
}
|
||||
|
||||
public TypeHolderExample stringItem(String stringItem) {
|
||||
|
||||
@@ -81,7 +81,7 @@ public class User {
|
||||
@SerializedName(SERIALIZED_NAME_USER_STATUS)
|
||||
private Integer userStatus;
|
||||
|
||||
public User() {
|
||||
public User() {
|
||||
}
|
||||
|
||||
public User id(Long id) {
|
||||
|
||||
@@ -168,7 +168,7 @@ public class XmlItem {
|
||||
@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