diff --git a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache index 17833f918b5..5ff3347e1d1 100644 --- a/modules/openapi-generator/src/main/resources/go-experimental/model.mustache +++ b/modules/openapi-generator/src/main/resources/go-experimental/model.mustache @@ -23,7 +23,7 @@ const ( {{#enumVars}} {{^-first}} {{/-first}} - {{name}} {{{classname}}} = "{{{value}}}" + {{{classname.toUpperCase}}}_{{name}} {{{classname}}} = "{{{value}}}" {{/enumVars}} {{/allowableValues}} ){{/isEnum}}{{^isEnum}}{{#description}} diff --git a/modules/openapi-generator/src/main/resources/go/model.mustache b/modules/openapi-generator/src/main/resources/go/model.mustache index 1a9f8d1c5aa..05c1f107206 100644 --- a/modules/openapi-generator/src/main/resources/go/model.mustache +++ b/modules/openapi-generator/src/main/resources/go/model.mustache @@ -23,7 +23,7 @@ const ( {{#enumVars}} {{^-first}} {{/-first}} - {{name}} {{{classname}}} = "{{{value}}}" + {{{classname.toUpperCase}}}_{{name}} {{{classname}}} = "{{{value}}}" {{/enumVars}} {{/allowableValues}} ){{/isEnum}}{{^isEnum}}{{#description}} diff --git a/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go b/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go index 9d3dd60a946..550c4e58e89 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_enum_class.go @@ -13,7 +13,7 @@ type EnumClass string // List of EnumClass const ( - ABC EnumClass = "_abc" - EFG EnumClass = "-efg" - XYZ EnumClass = "(xyz)" + ENUMCLASS_ABC EnumClass = "_abc" + ENUMCLASS_EFG EnumClass = "-efg" + ENUMCLASS_XYZ EnumClass = "(xyz)" ) \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go b/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go index c6b28556bf2..9568e634660 100644 --- a/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go +++ b/samples/client/petstore/go/go-petstore-withXml/model_outer_enum.go @@ -13,7 +13,7 @@ type OuterEnum string // List of OuterEnum const ( - PLACED OuterEnum = "placed" - APPROVED OuterEnum = "approved" - DELIVERED OuterEnum = "delivered" + OUTERENUM_PLACED OuterEnum = "placed" + OUTERENUM_APPROVED OuterEnum = "approved" + OUTERENUM_DELIVERED OuterEnum = "delivered" ) \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/model_enum_class.go b/samples/client/petstore/go/go-petstore/model_enum_class.go index 534ce432881..63b983c3b84 100644 --- a/samples/client/petstore/go/go-petstore/model_enum_class.go +++ b/samples/client/petstore/go/go-petstore/model_enum_class.go @@ -12,7 +12,7 @@ type EnumClass string // List of EnumClass const ( - ABC EnumClass = "_abc" - EFG EnumClass = "-efg" - XYZ EnumClass = "(xyz)" + ENUMCLASS_ABC EnumClass = "_abc" + ENUMCLASS_EFG EnumClass = "-efg" + ENUMCLASS_XYZ EnumClass = "(xyz)" ) \ No newline at end of file diff --git a/samples/client/petstore/go/go-petstore/model_outer_enum.go b/samples/client/petstore/go/go-petstore/model_outer_enum.go index 903d31e8269..2e46b8ae1d2 100644 --- a/samples/client/petstore/go/go-petstore/model_outer_enum.go +++ b/samples/client/petstore/go/go-petstore/model_outer_enum.go @@ -12,7 +12,7 @@ type OuterEnum string // List of OuterEnum const ( - PLACED OuterEnum = "placed" - APPROVED OuterEnum = "approved" - DELIVERED OuterEnum = "delivered" + OUTERENUM_PLACED OuterEnum = "placed" + OUTERENUM_APPROVED OuterEnum = "approved" + OUTERENUM_DELIVERED OuterEnum = "delivered" ) \ No newline at end of file