Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JAVA] fix inner enums of booleans #19815

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{{#withXml}}
@XmlEnumValue({{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}}{{{value}}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isLong}}"{{/isLong}}{{#isFloat}}"{{/isFloat}})
{{/withXml}}
{{{name}}}({{{value}}}){{^-last}},
{{{name}}}({{^isUri}}{{dataType}}.valueOf({{/isUri}}{{{value}}}{{^isUri}}){{/isUri}}){{^-last}},
{{/-last}}{{#-last}};{{/-last}}
{{/enumVars}}
{{/allowableValues}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public class DefaultValue {
* Gets or Sets arrayStringEnumDefault
*/
public enum ArrayStringEnumDefaultEnum {
SUCCESS("success"),
SUCCESS(String.valueOf("success")),

FAILURE("failure"),
FAILURE(String.valueOf("failure")),

UNCLASSIFIED("unclassified");
UNCLASSIFIED(String.valueOf("unclassified"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ public class Pet {
* pet status in the store
*/
public enum StatusEnum {
AVAILABLE("available"),
AVAILABLE(String.valueOf("available")),

PENDING("pending"),
PENDING(String.valueOf("pending")),

SOLD("sold");
SOLD(String.valueOf("sold"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public class Query {
* Gets or Sets outcomes
*/
public enum OutcomesEnum {
SUCCESS("SUCCESS"),
SUCCESS(String.valueOf("SUCCESS")),

FAILURE("FAILURE"),
FAILURE(String.valueOf("FAILURE")),

SKIPPED("SKIPPED");
SKIPPED(String.valueOf("SKIPPED"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public class DefaultValue {
*/
@JsonAdapter(ArrayStringEnumDefaultEnum.Adapter.class)
public enum ArrayStringEnumDefaultEnum {
SUCCESS("success"),
SUCCESS(String.valueOf("success")),

FAILURE("failure"),
FAILURE(String.valueOf("failure")),

UNCLASSIFIED("unclassified");
UNCLASSIFIED(String.valueOf("unclassified"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public class Pet {
*/
@JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
AVAILABLE("available"),
AVAILABLE(String.valueOf("available")),

PENDING("pending"),
PENDING(String.valueOf("pending")),

SOLD("sold");
SOLD(String.valueOf("sold"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ public class Query {
*/
@JsonAdapter(OutcomesEnum.Adapter.class)
public enum OutcomesEnum {
SUCCESS("SUCCESS"),
SUCCESS(String.valueOf("SUCCESS")),

FAILURE("FAILURE"),
FAILURE(String.valueOf("FAILURE")),

SKIPPED("SKIPPED");
SKIPPED(String.valueOf("SKIPPED"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public class DefaultValue {
* Gets or Sets arrayStringEnumDefault
*/
public enum ArrayStringEnumDefaultEnum {
SUCCESS("success"),
SUCCESS(String.valueOf("success")),

FAILURE("failure"),
FAILURE(String.valueOf("failure")),

UNCLASSIFIED("unclassified");
UNCLASSIFIED(String.valueOf("unclassified"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ public class Pet {
* pet status in the store
*/
public enum StatusEnum {
AVAILABLE("available"),
AVAILABLE(String.valueOf("available")),

PENDING("pending"),
PENDING(String.valueOf("pending")),

SOLD("sold");
SOLD(String.valueOf("sold"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ public class Query {
* Gets or Sets outcomes
*/
public enum OutcomesEnum {
SUCCESS("SUCCESS"),
SUCCESS(String.valueOf("SUCCESS")),

FAILURE("FAILURE"),
FAILURE(String.valueOf("FAILURE")),

SKIPPED("SKIPPED");
SKIPPED(String.valueOf("SKIPPED"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ public class DefaultValue {
* Gets or Sets arrayStringEnumDefault
*/
public enum ArrayStringEnumDefaultEnum {
SUCCESS("success"),
SUCCESS(String.valueOf("success")),

FAILURE("failure"),
FAILURE(String.valueOf("failure")),

UNCLASSIFIED("unclassified");
UNCLASSIFIED(String.valueOf("unclassified"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public class Pet {
* pet status in the store
*/
public enum StatusEnum {
AVAILABLE("available"),
AVAILABLE(String.valueOf("available")),

PENDING("pending"),
PENDING(String.valueOf("pending")),

SOLD("sold");
SOLD(String.valueOf("sold"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public class Query {
* Gets or Sets outcomes
*/
public enum OutcomesEnum {
SUCCESS("SUCCESS"),
SUCCESS(String.valueOf("SUCCESS")),

FAILURE("FAILURE"),
FAILURE(String.valueOf("FAILURE")),

SKIPPED("SKIPPED");
SKIPPED(String.valueOf("SKIPPED"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ public class DefaultValue {
* Gets or Sets arrayStringEnumDefault
*/
public enum ArrayStringEnumDefaultEnum {
SUCCESS("success"),
SUCCESS(String.valueOf("success")),

FAILURE("failure"),
FAILURE(String.valueOf("failure")),

UNCLASSIFIED("unclassified");
UNCLASSIFIED(String.valueOf("unclassified"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public class Pet {
* pet status in the store
*/
public enum StatusEnum {
AVAILABLE("available"),
AVAILABLE(String.valueOf("available")),

PENDING("pending"),
PENDING(String.valueOf("pending")),

SOLD("sold");
SOLD(String.valueOf("sold"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public class Query {
* Gets or Sets outcomes
*/
public enum OutcomesEnum {
SUCCESS("SUCCESS"),
SUCCESS(String.valueOf("SUCCESS")),

FAILURE("FAILURE"),
FAILURE(String.valueOf("FAILURE")),

SKIPPED("SKIPPED");
SKIPPED(String.valueOf("SKIPPED"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ public class DefaultValue {
* Gets or Sets arrayStringEnumDefault
*/
public enum ArrayStringEnumDefaultEnum {
SUCCESS("success"),
SUCCESS(String.valueOf("success")),

FAILURE("failure"),
FAILURE(String.valueOf("failure")),

UNCLASSIFIED("unclassified");
UNCLASSIFIED(String.valueOf("unclassified"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public class Pet {
* pet status in the store
*/
public enum StatusEnum {
AVAILABLE("available"),
AVAILABLE(String.valueOf("available")),

PENDING("pending"),
PENDING(String.valueOf("pending")),

SOLD("sold");
SOLD(String.valueOf("sold"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ public class Query {
* Gets or Sets outcomes
*/
public enum OutcomesEnum {
SUCCESS("SUCCESS"),
SUCCESS(String.valueOf("SUCCESS")),

FAILURE("FAILURE"),
FAILURE(String.valueOf("FAILURE")),

SKIPPED("SKIPPED");
SKIPPED(String.valueOf("SKIPPED"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public class EnumArrays {
* Gets or Sets justSymbol
*/
public enum JustSymbolEnum {
GREATER_THAN_OR_EQUAL_TO(">="),
GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")),

DOLLAR("$");
DOLLAR(String.valueOf("$"));

private String value;

Expand Down Expand Up @@ -80,9 +80,9 @@ public static JustSymbolEnum fromValue(String value) {
* Gets or Sets arrayEnum
*/
public enum ArrayEnumEnum {
FISH("fish"),
FISH(String.valueOf("fish")),

CRAB("crab");
CRAB(String.valueOf("crab"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ public class EnumTest {
* Gets or Sets enumString
*/
public enum EnumStringEnum {
UPPER("UPPER"),
UPPER(String.valueOf("UPPER")),

LOWER("lower"),
LOWER(String.valueOf("lower")),

EMPTY("");
EMPTY(String.valueOf(""));

private String value;

Expand Down Expand Up @@ -94,11 +94,11 @@ public static EnumStringEnum fromValue(String value) {
* Gets or Sets enumStringRequired
*/
public enum EnumStringRequiredEnum {
UPPER("UPPER"),
UPPER(String.valueOf("UPPER")),

LOWER("lower"),
LOWER(String.valueOf("lower")),

EMPTY("");
EMPTY(String.valueOf(""));

private String value;

Expand Down Expand Up @@ -134,9 +134,9 @@ public static EnumStringRequiredEnum fromValue(String value) {
* Gets or Sets enumInteger
*/
public enum EnumIntegerEnum {
NUMBER_1(1),
NUMBER_1(Integer.valueOf(1)),

NUMBER_MINUS_1(-1);
NUMBER_MINUS_1(Integer.valueOf(-1));

private Integer value;

Expand Down Expand Up @@ -172,9 +172,9 @@ public static EnumIntegerEnum fromValue(Integer value) {
* Gets or Sets enumNumber
*/
public enum EnumNumberEnum {
NUMBER_1_DOT_1(1.1),
NUMBER_1_DOT_1(Double.valueOf(1.1)),

NUMBER_MINUS_1_DOT_2(-1.2);
NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2));

private Double value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public class MapTest {
* Gets or Sets inner
*/
public enum InnerEnum {
UPPER("UPPER"),
UPPER(String.valueOf("UPPER")),

LOWER("lower");
LOWER(String.valueOf("lower"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ public class Order {
* Order Status
*/
public enum StatusEnum {
PLACED("placed"),
PLACED(String.valueOf("placed")),

APPROVED("approved"),
APPROVED(String.valueOf("approved")),

DELIVERED("delivered");
DELIVERED(String.valueOf("delivered"));

private String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class ParentWithNullable {
* Gets or Sets type
*/
public enum TypeEnum {
CHILD_WITH_NULLABLE("ChildWithNullable");
CHILD_WITH_NULLABLE(String.valueOf("ChildWithNullable"));

private String value;

Expand Down
Loading
Loading