forked from loafle/openapi-generator-original
fix issue when discriminator property is an enum string (#13001)
This commit is contained in:
@@ -38,7 +38,8 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesAnyType() {
|
||||
public AdditionalPropertiesAnyType() {
|
||||
|
||||
}
|
||||
|
||||
public AdditionalPropertiesAnyType name(String name) {
|
||||
|
||||
@@ -39,7 +39,8 @@ public class AdditionalPropertiesArray extends HashMap<String, List> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesArray() {
|
||||
public AdditionalPropertiesArray() {
|
||||
|
||||
}
|
||||
|
||||
public AdditionalPropertiesArray name(String name) {
|
||||
|
||||
@@ -38,7 +38,8 @@ public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesBoolean() {
|
||||
public AdditionalPropertiesBoolean() {
|
||||
|
||||
}
|
||||
|
||||
public AdditionalPropertiesBoolean name(String name) {
|
||||
|
||||
@@ -80,7 +80,7 @@ public class AdditionalPropertiesClass {
|
||||
public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3";
|
||||
private Object anytype3;
|
||||
|
||||
public AdditionalPropertiesClass() {
|
||||
public AdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
|
||||
|
||||
@@ -38,7 +38,8 @@ public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesInteger() {
|
||||
public AdditionalPropertiesInteger() {
|
||||
|
||||
}
|
||||
|
||||
public AdditionalPropertiesInteger name(String name) {
|
||||
|
||||
@@ -39,7 +39,8 @@ public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesNumber() {
|
||||
public AdditionalPropertiesNumber() {
|
||||
|
||||
}
|
||||
|
||||
public AdditionalPropertiesNumber name(String name) {
|
||||
|
||||
@@ -38,7 +38,8 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesObject() {
|
||||
public AdditionalPropertiesObject() {
|
||||
|
||||
}
|
||||
|
||||
public AdditionalPropertiesObject name(String name) {
|
||||
|
||||
@@ -38,7 +38,8 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public AdditionalPropertiesString() {
|
||||
public AdditionalPropertiesString() {
|
||||
|
||||
}
|
||||
|
||||
public AdditionalPropertiesString name(String name) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class Animal {
|
||||
public static final String JSON_PROPERTY_COLOR = "color";
|
||||
private String color = "red";
|
||||
|
||||
public Animal() {
|
||||
public Animal() {
|
||||
}
|
||||
|
||||
public Animal className(String className) {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber";
|
||||
private List<List<BigDecimal>> arrayArrayNumber = null;
|
||||
|
||||
public ArrayOfArrayOfNumberOnly() {
|
||||
public ArrayOfArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ArrayOfNumberOnly {
|
||||
public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber";
|
||||
private List<BigDecimal> arrayNumber = null;
|
||||
|
||||
public ArrayOfNumberOnly() {
|
||||
public ArrayOfNumberOnly() {
|
||||
}
|
||||
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ArrayTest {
|
||||
public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model";
|
||||
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
|
||||
|
||||
public ArrayTest() {
|
||||
public ArrayTest() {
|
||||
}
|
||||
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
|
||||
@@ -85,7 +85,8 @@ public class BigCat extends Cat {
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
public BigCat() {
|
||||
public BigCat() {
|
||||
|
||||
}
|
||||
|
||||
public BigCat kind(KindEnum kind) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public class BigCatAllOf {
|
||||
public static final String JSON_PROPERTY_KIND = "kind";
|
||||
private KindEnum kind;
|
||||
|
||||
public BigCatAllOf() {
|
||||
public BigCatAllOf() {
|
||||
}
|
||||
|
||||
public BigCatAllOf kind(KindEnum kind) {
|
||||
|
||||
@@ -56,7 +56,7 @@ public class Capitalization {
|
||||
public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME";
|
||||
private String ATT_NAME;
|
||||
|
||||
public Capitalization() {
|
||||
public Capitalization() {
|
||||
}
|
||||
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
|
||||
@@ -50,7 +50,8 @@ public class Cat extends Animal {
|
||||
public static final String JSON_PROPERTY_DECLAWED = "declawed";
|
||||
private Boolean declawed;
|
||||
|
||||
public Cat() {
|
||||
public Cat() {
|
||||
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class CatAllOf {
|
||||
public static final String JSON_PROPERTY_DECLAWED = "declawed";
|
||||
private Boolean declawed;
|
||||
|
||||
public CatAllOf() {
|
||||
public CatAllOf() {
|
||||
}
|
||||
|
||||
public CatAllOf declawed(Boolean declawed) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Category {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name = "default-name";
|
||||
|
||||
public Category() {
|
||||
public Category() {
|
||||
}
|
||||
|
||||
public Category id(Long id) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ClassModel {
|
||||
public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class";
|
||||
private String propertyClass;
|
||||
|
||||
public ClassModel() {
|
||||
public ClassModel() {
|
||||
}
|
||||
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Client {
|
||||
public static final String JSON_PROPERTY_CLIENT = "client";
|
||||
private String client;
|
||||
|
||||
public Client() {
|
||||
public Client() {
|
||||
}
|
||||
|
||||
public Client client(String client) {
|
||||
|
||||
@@ -46,7 +46,8 @@ public class Dog extends Animal {
|
||||
public static final String JSON_PROPERTY_BREED = "breed";
|
||||
private String breed;
|
||||
|
||||
public Dog() {
|
||||
public Dog() {
|
||||
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class DogAllOf {
|
||||
public static final String JSON_PROPERTY_BREED = "breed";
|
||||
private String breed;
|
||||
|
||||
public DogAllOf() {
|
||||
public DogAllOf() {
|
||||
}
|
||||
|
||||
public DogAllOf breed(String breed) {
|
||||
|
||||
@@ -112,7 +112,7 @@ public class EnumArrays {
|
||||
public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum";
|
||||
private List<ArrayEnumEnum> arrayEnum = null;
|
||||
|
||||
public EnumArrays() {
|
||||
public EnumArrays() {
|
||||
}
|
||||
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
|
||||
@@ -198,7 +198,7 @@ public class EnumTest {
|
||||
public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum";
|
||||
private OuterEnum outerEnum;
|
||||
|
||||
public EnumTest() {
|
||||
public EnumTest() {
|
||||
}
|
||||
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class FileSchemaTestClass {
|
||||
public static final String JSON_PROPERTY_FILES = "files";
|
||||
private List<ModelFile> files = null;
|
||||
|
||||
public FileSchemaTestClass() {
|
||||
public FileSchemaTestClass() {
|
||||
}
|
||||
|
||||
public FileSchemaTestClass _file(ModelFile _file) {
|
||||
|
||||
@@ -94,7 +94,7 @@ public class FormatTest {
|
||||
public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal";
|
||||
private BigDecimal bigDecimal;
|
||||
|
||||
public FormatTest() {
|
||||
public FormatTest() {
|
||||
}
|
||||
|
||||
public FormatTest integer(Integer integer) {
|
||||
|
||||
@@ -41,7 +41,7 @@ public class HasOnlyReadOnly {
|
||||
public static final String JSON_PROPERTY_FOO = "foo";
|
||||
private String foo;
|
||||
|
||||
public HasOnlyReadOnly() {
|
||||
public HasOnlyReadOnly() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
|
||||
@@ -85,7 +85,7 @@ public class MapTest {
|
||||
public static final String JSON_PROPERTY_INDIRECT_MAP = "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 {
|
||||
public static final String JSON_PROPERTY_MAP = "map";
|
||||
private Map<String, Animal> map = null;
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||
public MixedPropertiesAndAdditionalPropertiesClass() {
|
||||
}
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Model200Response {
|
||||
public static final String JSON_PROPERTY_PROPERTY_CLASS = "class";
|
||||
private String propertyClass;
|
||||
|
||||
public Model200Response() {
|
||||
public Model200Response() {
|
||||
}
|
||||
|
||||
public Model200Response name(Integer name) {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ModelApiResponse {
|
||||
public static final String JSON_PROPERTY_MESSAGE = "message";
|
||||
private String message;
|
||||
|
||||
public ModelApiResponse() {
|
||||
public ModelApiResponse() {
|
||||
}
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ModelFile {
|
||||
public static final String JSON_PROPERTY_SOURCE_U_R_I = "sourceURI";
|
||||
private String sourceURI;
|
||||
|
||||
public ModelFile() {
|
||||
public ModelFile() {
|
||||
}
|
||||
|
||||
public ModelFile sourceURI(String sourceURI) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class ModelList {
|
||||
public static final String JSON_PROPERTY_123LIST = "123-list";
|
||||
private String _123list;
|
||||
|
||||
public ModelList() {
|
||||
public ModelList() {
|
||||
}
|
||||
|
||||
public ModelList _123list(String _123list) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class ModelReturn {
|
||||
public static final String JSON_PROPERTY_RETURN = "return";
|
||||
private Integer _return;
|
||||
|
||||
public ModelReturn() {
|
||||
public ModelReturn() {
|
||||
}
|
||||
|
||||
public ModelReturn _return(Integer _return) {
|
||||
|
||||
@@ -49,7 +49,7 @@ public class Name {
|
||||
public static final String JSON_PROPERTY_123NUMBER = "123Number";
|
||||
private Integer _123number;
|
||||
|
||||
public Name() {
|
||||
public Name() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
|
||||
@@ -37,7 +37,7 @@ public class NumberOnly {
|
||||
public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber";
|
||||
private BigDecimal justNumber;
|
||||
|
||||
public NumberOnly() {
|
||||
public NumberOnly() {
|
||||
}
|
||||
|
||||
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||
|
||||
@@ -94,7 +94,7 @@ public class Order {
|
||||
public static final String JSON_PROPERTY_COMPLETE = "complete";
|
||||
private Boolean complete = false;
|
||||
|
||||
public Order() {
|
||||
public Order() {
|
||||
}
|
||||
|
||||
public Order id(Long id) {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class OuterComposite {
|
||||
public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean";
|
||||
private Boolean myBoolean;
|
||||
|
||||
public OuterComposite() {
|
||||
public OuterComposite() {
|
||||
}
|
||||
|
||||
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||
|
||||
@@ -100,7 +100,7 @@ public class Pet {
|
||||
public static final String JSON_PROPERTY_STATUS = "status";
|
||||
private StatusEnum status;
|
||||
|
||||
public Pet() {
|
||||
public Pet() {
|
||||
}
|
||||
|
||||
public Pet id(Long id) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ReadOnlyFirst {
|
||||
public static final String JSON_PROPERTY_BAZ = "baz";
|
||||
private String baz;
|
||||
|
||||
public ReadOnlyFirst() {
|
||||
public ReadOnlyFirst() {
|
||||
}
|
||||
|
||||
@JsonCreator
|
||||
|
||||
@@ -37,7 +37,7 @@ public class SpecialModelName {
|
||||
public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]";
|
||||
private Long $specialPropertyName;
|
||||
|
||||
public SpecialModelName() {
|
||||
public SpecialModelName() {
|
||||
}
|
||||
|
||||
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Tag {
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public Tag() {
|
||||
public Tag() {
|
||||
}
|
||||
|
||||
public Tag id(Long id) {
|
||||
|
||||
@@ -55,7 +55,7 @@ public class TypeHolderDefault {
|
||||
public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item";
|
||||
private List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderDefault() {
|
||||
public TypeHolderDefault() {
|
||||
}
|
||||
|
||||
public TypeHolderDefault stringItem(String stringItem) {
|
||||
|
||||
@@ -59,7 +59,7 @@ public class TypeHolderExample {
|
||||
public static final String JSON_PROPERTY_ARRAY_ITEM = "array_item";
|
||||
private List<Integer> arrayItem = new ArrayList<>();
|
||||
|
||||
public TypeHolderExample() {
|
||||
public TypeHolderExample() {
|
||||
}
|
||||
|
||||
public TypeHolderExample stringItem(String stringItem) {
|
||||
|
||||
@@ -64,7 +64,7 @@ public class User {
|
||||
public static final String JSON_PROPERTY_USER_STATUS = "userStatus";
|
||||
private Integer userStatus;
|
||||
|
||||
public User() {
|
||||
public User() {
|
||||
}
|
||||
|
||||
public User id(Long id) {
|
||||
|
||||
@@ -151,7 +151,7 @@ public class XmlItem {
|
||||
public static final String JSON_PROPERTY_PREFIX_NS_WRAPPED_ARRAY = "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