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

Generate enums prefixed with model names to prevent collisions #1

Merged
merged 1 commit into from
Aug 30, 2019
Merged

Generate enums prefixed with model names to prevent collisions #1

merged 1 commit into from
Aug 30, 2019

Conversation

arvindth
Copy link

Diff of one of the sample enum files looks like:

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 534ce43288..e94b84dfca 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)"
+       ENUM_CLASS_ABC EnumClass = "_abc"
+       ENUM_CLASS_EFG EnumClass = "-efg"
+       ENUM_CLASS_XYZ EnumClass = "(xyz)"
 )

@DABH DABH merged commit 6aebdfe into DABH:master Aug 30, 2019
@arvindth arvindth deleted the ath-namespaced-enums branch August 30, 2019 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants