forked from loafle/openapi-generator-original
[java] add useNullForUnknownEnumValue option (#633)
This commit is contained in:
@@ -61,7 +61,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<JustSymbolEnum> {
|
||||
@@ -112,7 +112,7 @@ public class EnumArrays {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<ArrayEnumEnum> {
|
||||
|
||||
@@ -56,7 +56,7 @@ public enum EnumClass {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumClass> {
|
||||
|
||||
@@ -62,7 +62,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringEnum> {
|
||||
@@ -115,7 +115,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumStringRequiredEnum> {
|
||||
@@ -166,7 +166,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumIntegerEnum> {
|
||||
@@ -217,7 +217,7 @@ public class EnumTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<EnumNumberEnum> {
|
||||
|
||||
@@ -67,7 +67,7 @@ public class MapTest {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<InnerEnum> {
|
||||
|
||||
@@ -78,7 +78,7 @@ public class Order {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
||||
@@ -56,7 +56,7 @@ public enum OuterEnum {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<OuterEnum> {
|
||||
|
||||
@@ -85,7 +85,7 @@ public class Pet {
|
||||
return b;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
throw new IllegalArgumentException("Unexpected value '" + text + "'");
|
||||
}
|
||||
|
||||
public static class Adapter extends TypeAdapter<StatusEnum> {
|
||||
|
||||
Reference in New Issue
Block a user