From bfa26ea6be6af4984f94b60c67bc4fb0a5d76181 Mon Sep 17 00:00:00 2001 From: Renato Mameli <100513510+renatomameli@users.noreply.github.com> Date: Tue, 21 May 2024 09:29:34 +0200 Subject: [PATCH] Add missing underscores for PascalCase enum values #4837 (#18594) Co-authored-by: Renato Mameli --- .../codegen/languages/AbstractJavaCodegen.java | 2 +- .../openapitools/codegen/java/AbstractJavaCodegenTest.java | 7 +++++++ .../others/java/okhttp-gson-streaming/docs/SomeObj.md | 2 +- .../main/java/org/openapitools/client/model/SomeObj.java | 4 ++-- .../java-helidon-client/v3/mp/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../java-helidon-client/v3/se/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../java-helidon-client/v4/mp/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../java/apache-httpclient/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- samples/client/petstore/java/jersey3/docs/ChildCat.md | 2 +- samples/client/petstore/java/native-async/docs/ChildCat.md | 2 +- samples/client/petstore/java/native/docs/ChildCat.md | 2 +- .../java/restclient-swagger2/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../petstore/java/restclient/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../petstore/java/resteasy/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../java/resttemplate-withXml/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../petstore/java/resttemplate/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../client/petstore/java/vertx/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../java/webclient-jakarta/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../java/webclient-swagger2/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../petstore/java/webclient/docs/ParentWithNullable.md | 2 +- .../org/openapitools/client/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullableDto.java | 2 +- .../client/petstore/java/jersey2-java8/docs/ChildCat.md | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../org/openapitools/server/model/ParentWithNullable.java | 2 +- .../org/openapitools/server/model/ParentWithNullable.java | 2 +- .../org/openapitools/server/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullable.java | 2 +- .../openapitools/virtualan/model/ParentWithNullable.java | 2 +- .../java/org/openapitools/model/ParentWithNullableDto.java | 2 +- 58 files changed, 65 insertions(+), 58 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index f582e0d22565..0ca8bcc2b360 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -2055,7 +2055,7 @@ public String toEnumVarName(String value, String datatype) { } // string - String var = value.replaceAll("\\W+", "_").toUpperCase(Locale.ROOT); + String var = underscore(value.replaceAll("\\W+", "_")).toUpperCase(Locale.ROOT); if (var.matches("\\d.*")) { var = "_" + var; } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java index 94646559e5fe..dbca31cda544 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/java/AbstractJavaCodegenTest.java @@ -61,6 +61,13 @@ public void toEnumVarNameShouldNotResultInSingleUnderscore() throws Exception { Assert.assertEquals(fakeJavaCodegen.toEnumVarName("==", "String"), "u"); } + @Test + public void toEnumVarNameAddUnderscoresIfValueIsPascalCase() { + Assert.assertEquals(fakeJavaCodegen.toEnumVarName("OnlyCamelCase", "String"), "ONLY_CAMEL_CASE"); + Assert.assertEquals(fakeJavaCodegen.toEnumVarName("WithNumber1", "String"), "WITH_NUMBER1"); + Assert.assertEquals(fakeJavaCodegen.toEnumVarName("_LeadingUnderscore", "String"), "_LEADING_UNDERSCORE"); + } + @Test public void toVarNameShouldAvoidOverloadingGetClassMethod() throws Exception { Assert.assertEquals(fakeJavaCodegen.toVarName("class"), "propertyClass"); diff --git a/samples/client/others/java/okhttp-gson-streaming/docs/SomeObj.md b/samples/client/others/java/okhttp-gson-streaming/docs/SomeObj.md index 70bf3335f7be..d27439c839f1 100644 --- a/samples/client/others/java/okhttp-gson-streaming/docs/SomeObj.md +++ b/samples/client/others/java/okhttp-gson-streaming/docs/SomeObj.md @@ -19,7 +19,7 @@ | Name | Value | |---- | -----| -| SOMEOBJIDENTIFIER | "SomeObjIdentifier" | +| SOME_OBJ_IDENTIFIER | "SomeObjIdentifier" | ## Implemented Interfaces diff --git a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java index e75a4f290129..4cfec8012af8 100644 --- a/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java +++ b/samples/client/others/java/okhttp-gson-streaming/src/main/java/org/openapitools/client/model/SomeObj.java @@ -59,7 +59,7 @@ public class SomeObj implements Serializable { */ @JsonAdapter(TypeEnum.Adapter.class) public enum TypeEnum { - SOMEOBJIDENTIFIER("SomeObjIdentifier"); + SOME_OBJ_IDENTIFIER("SomeObjIdentifier"); private String value; @@ -106,7 +106,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti public static final String SERIALIZED_NAME_$_TYPE = "$_type"; @SerializedName(SERIALIZED_NAME_$_TYPE) - private TypeEnum $type = TypeEnum.SOMEOBJIDENTIFIER; + private TypeEnum $type = TypeEnum.SOME_OBJ_IDENTIFIER; public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) diff --git a/samples/client/petstore/java-helidon-client/v3/mp/docs/ParentWithNullable.md b/samples/client/petstore/java-helidon-client/v3/mp/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/docs/ParentWithNullable.md +++ b/samples/client/petstore/java-helidon-client/v3/mp/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 25c24ff86020..d22980be614c 100644 --- a/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java-helidon-client/v3/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -31,7 +31,7 @@ public class ParentWithNullable { public enum TypeEnum { - CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + CHILD_WITH_NULLABLE(String.valueOf("ChildWithNullable")); String value; diff --git a/samples/client/petstore/java-helidon-client/v3/se/docs/ParentWithNullable.md b/samples/client/petstore/java-helidon-client/v3/se/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/docs/ParentWithNullable.md +++ b/samples/client/petstore/java-helidon-client/v3/se/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 25c24ff86020..d22980be614c 100644 --- a/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java-helidon-client/v3/se/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -31,7 +31,7 @@ public class ParentWithNullable { public enum TypeEnum { - CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + CHILD_WITH_NULLABLE(String.valueOf("ChildWithNullable")); String value; diff --git a/samples/client/petstore/java-helidon-client/v4/mp/docs/ParentWithNullable.md b/samples/client/petstore/java-helidon-client/v4/mp/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/docs/ParentWithNullable.md +++ b/samples/client/petstore/java-helidon-client/v4/mp/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 25c24ff86020..d22980be614c 100644 --- a/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java-helidon-client/v4/mp/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -31,7 +31,7 @@ public class ParentWithNullable { public enum TypeEnum { - CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + CHILD_WITH_NULLABLE(String.valueOf("ChildWithNullable")); String value; diff --git a/samples/client/petstore/java/apache-httpclient/docs/ParentWithNullable.md b/samples/client/petstore/java/apache-httpclient/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/apache-httpclient/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/apache-httpclient/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 7c97a5e1cb54..9bab5d1f2a55 100644 --- a/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/apache-httpclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -55,7 +55,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 8492ea806d15..088bcae658e5 100644 --- a/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/feign/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -52,7 +52,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/jersey3/docs/ChildCat.md b/samples/client/petstore/java/jersey3/docs/ChildCat.md index 3f39832529b9..258d87e56998 100644 --- a/samples/client/petstore/java/jersey3/docs/ChildCat.md +++ b/samples/client/petstore/java/jersey3/docs/ChildCat.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDCAT | "ChildCat" | +| CHILD_CAT | "ChildCat" | diff --git a/samples/client/petstore/java/native-async/docs/ChildCat.md b/samples/client/petstore/java/native-async/docs/ChildCat.md index 3f39832529b9..258d87e56998 100644 --- a/samples/client/petstore/java/native-async/docs/ChildCat.md +++ b/samples/client/petstore/java/native-async/docs/ChildCat.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDCAT | "ChildCat" | +| CHILD_CAT | "ChildCat" | diff --git a/samples/client/petstore/java/native/docs/ChildCat.md b/samples/client/petstore/java/native/docs/ChildCat.md index 3f39832529b9..258d87e56998 100644 --- a/samples/client/petstore/java/native/docs/ChildCat.md +++ b/samples/client/petstore/java/native/docs/ChildCat.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDCAT | "ChildCat" | +| CHILD_CAT | "ChildCat" | diff --git a/samples/client/petstore/java/restclient-swagger2/docs/ParentWithNullable.md b/samples/client/petstore/java/restclient-swagger2/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/restclient-swagger2/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/restclient-swagger2/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 96be701418bb..1bd0c8646156 100644 --- a/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/restclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -53,7 +53,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/restclient/docs/ParentWithNullable.md b/samples/client/petstore/java/restclient/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/restclient/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/restclient/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 74f3be28898f..ed98b677eb32 100644 --- a/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/restclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -52,7 +52,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/resteasy/docs/ParentWithNullable.md b/samples/client/petstore/java/resteasy/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/resteasy/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/resteasy/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java index a977978f86d6..427b0421acd8 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -52,7 +52,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/ParentWithNullable.md b/samples/client/petstore/java/resttemplate-withXml/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 68337b87afaf..d945d64d634f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -62,7 +62,7 @@ public class ParentWithNullable { @XmlEnum(String.class) public enum TypeEnum { @XmlEnumValue("ChildWithNullable") - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/resttemplate/docs/ParentWithNullable.md b/samples/client/petstore/java/resttemplate/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/resttemplate/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/resttemplate/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 78c019e383ef..c09a92ea3be1 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -52,7 +52,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/vertx/docs/ParentWithNullable.md b/samples/client/petstore/java/vertx/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/vertx/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/vertx/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java index a977978f86d6..427b0421acd8 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -52,7 +52,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/webclient-jakarta/docs/ParentWithNullable.md b/samples/client/petstore/java/webclient-jakarta/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/webclient-jakarta/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/webclient-jakarta/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 74f3be28898f..ed98b677eb32 100644 --- a/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/webclient-jakarta/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -52,7 +52,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/webclient-swagger2/docs/ParentWithNullable.md b/samples/client/petstore/java/webclient-swagger2/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/webclient-swagger2/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/webclient-swagger2/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java index 31e38fad9e25..331ecad27bd3 100644 --- a/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/webclient-swagger2/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -53,7 +53,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/java/webclient/docs/ParentWithNullable.md b/samples/client/petstore/java/webclient/docs/ParentWithNullable.md index b8fcf6b42e8f..e4d322985632 100644 --- a/samples/client/petstore/java/webclient/docs/ParentWithNullable.md +++ b/samples/client/petstore/java/webclient/docs/ParentWithNullable.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | +| CHILD_WITH_NULLABLE | "ChildWithNullable" | diff --git a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java index a977978f86d6..427b0421acd8 100644 --- a/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ b/samples/client/petstore/java/webclient/src/main/java/org/openapitools/client/model/ParentWithNullable.java @@ -52,7 +52,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java index 0586bce083ec..7feaa4029fd7 100644 --- a/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/client/petstore/spring-http-interface-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -39,7 +39,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java index 472ebe88937c..32be19830132 100644 --- a/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ b/samples/client/petstore/spring-http-interface/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -40,7 +40,7 @@ public class ParentWithNullableDto { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md index 3f39832529b9..258d87e56998 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/ChildCat.md @@ -16,7 +16,7 @@ | Name | Value | |---- | -----| -| CHILDCAT | "ChildCat" | +| CHILD_CAT | "ChildCat" | diff --git a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java index 1c9f0a4cf083..1749253b10ed 100644 --- a/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/openapi3/client/petstore/spring-cloud-oas3-fakeapi/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -41,7 +41,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java index 1c9f0a4cf083..1749253b10ed 100644 --- a/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/openapi3/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -41,7 +41,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java index 1c9f0a4cf083..1749253b10ed 100644 --- a/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/openapi3/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -41,7 +41,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java b/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java index 3ea71056eb04..67de84d392df 100644 --- a/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java +++ b/samples/server/petstore/java-helidon-server/v3/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java @@ -31,7 +31,7 @@ public class ParentWithNullable { public enum TypeEnum { - CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + CHILD_WITH_NULLABLE(String.valueOf("ChildWithNullable")); private String value; diff --git a/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java b/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java index 74568b6224ed..e458a6ed3400 100644 --- a/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java +++ b/samples/server/petstore/java-helidon-server/v3/se/src/main/java/org/openapitools/server/model/ParentWithNullable.java @@ -18,7 +18,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java b/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java index 3ea71056eb04..67de84d392df 100644 --- a/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java +++ b/samples/server/petstore/java-helidon-server/v4/mp/src/main/java/org/openapitools/server/model/ParentWithNullable.java @@ -31,7 +31,7 @@ public class ParentWithNullable { public enum TypeEnum { - CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + CHILD_WITH_NULLABLE(String.valueOf("ChildWithNullable")); private String value; diff --git a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ParentWithNullable.java index da53bc510cc6..0a2f404a4913 100644 --- a/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/jaxrs-jersey/src/gen/java/org/openapitools/model/ParentWithNullable.java @@ -43,7 +43,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/ParentWithNullable.java index 4076d32ee13e..6cd935f02e55 100644 --- a/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/jaxrs-spec-quarkus-mutiny/src/gen/java/org/openapitools/model/ParentWithNullable.java @@ -26,7 +26,7 @@ public class ParentWithNullable implements Serializable { public enum TypeEnum { - CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + CHILD_WITH_NULLABLE(String.valueOf("ChildWithNullable")); private String value; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ParentWithNullable.java index 44ce827713f7..1d741821153b 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/model/ParentWithNullable.java @@ -28,7 +28,7 @@ public class ParentWithNullable implements Serializable { public enum TypeEnum { - CHILDWITHNULLABLE(String.valueOf("ChildWithNullable")); + CHILD_WITH_NULLABLE(String.valueOf("ChildWithNullable")); private String value; diff --git a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ParentWithNullable.java index 98be97f7a949..211e4f5920bf 100644 --- a/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/jaxrs/jersey3/src/gen/java/org/openapitools/model/ParentWithNullable.java @@ -42,7 +42,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java index 1c9f0a4cf083..1749253b10ed 100644 --- a/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/spring-boot-defaultInterface-unhandledException/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -41,7 +41,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java index 513fa77902ae..e6b998778c84 100644 --- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -38,7 +38,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java index e04cb59707c7..1358f00414af 100644 --- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -42,7 +42,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java index e04cb59707c7..1358f00414af 100644 --- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -42,7 +42,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java index 736bc89a8616..7b81d13e0045 100644 --- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -42,7 +42,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java index e04cb59707c7..1358f00414af 100644 --- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -42,7 +42,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java index e04cb59707c7..1358f00414af 100644 --- a/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-reactive-noResponseEntity/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -42,7 +42,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java index e04cb59707c7..1358f00414af 100644 --- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -42,7 +42,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java index 36f78431977d..44440d260b02 100644 --- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/model/ParentWithNullable.java @@ -42,7 +42,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java index 90e4029e5941..d053a7c03418 100644 --- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java +++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/model/ParentWithNullable.java @@ -41,7 +41,7 @@ public class ParentWithNullable { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value; diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java index eca774cc06f3..a2f04a5f5d36 100644 --- a/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java +++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/model/ParentWithNullableDto.java @@ -43,7 +43,7 @@ public class ParentWithNullableDto { * Gets or Sets type */ public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); + CHILD_WITH_NULLABLE("ChildWithNullable"); private String value;