-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Go] Adding enum support #5635
Merged
Merged
[Go] Adding enum support #5635
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@marcusljx thanks for the PR to support outer enum. |
@wing328 will this PR be merged soon? |
@marcusljx PR merged. Thanks for the contribution. There are 2 enhancements I can think of:
I'll create an issue to track these. |
FYI. Created #5641 for tracking. |
wing328
changed the title
Adding enum generation support for golang client
[Go] Adding enum support
May 17, 2017
maros7
pushed a commit
to maros7/grpc-gateway
that referenced
this pull request
Aug 28, 2018
Added pathenum proto for an externally imported enum example and verification Added enum_helper.go to handle the lack of enum support in the swagger-codegen-cli 2.2.2 for Go, see swagger-api/swagger-codegen#5635
maros7
pushed a commit
to maros7/grpc-gateway
that referenced
this pull request
Aug 28, 2018
Updated protoc-gen-grpc-gateway to handle enum path parameters Regenerated examples Added pathenum proto for an externally imported enum example and verification Added enum_helper.go to handle the lack of enum support in the swagger-codegen-cli 2.2.2 for Go, see swagger-api/swagger-codegen#5635 Fixed browser integration test cases Updated bazel config Fixed last, faulty bazel config
maros7
pushed a commit
to maros7/grpc-gateway
that referenced
this pull request
Aug 28, 2018
Related to grpc-ecosystem#322 Updated protoc-gen-swagger to output enum path parameters correctly Updated protoc-gen-grpc-gateway to handle enum path parameters Regenerated examples Added pathenum proto for an externally imported enum example and verification Added enum_helper.go to handle the lack of enum support in the swagger-codegen-cli 2.2.2 for Go, see swagger-api/swagger-codegen#5635 Fixed browser integration test cases Updated bazel config Fixed last, faulty bazel config Updated integration test case to test both index == 0 and index > 0 for enums
johanbrandhorst
pushed a commit
to grpc-ecosystem/grpc-gateway
that referenced
this pull request
Aug 29, 2018
Related to #322 Updated protoc-gen-swagger to output enum path parameters correctly Updated protoc-gen-grpc-gateway to handle enum path parameters Regenerated examples Added pathenum proto for an externally imported enum example and verification Added enum_helper.go to handle the lack of enum support in the swagger-codegen-cli 2.2.2 for Go, see swagger-api/swagger-codegen#5635 Fixed browser integration test cases Updated bazel config Fixed last, faulty bazel config Updated integration test case to test both index == 0 and index > 0 for enums
adasari
pushed a commit
to adasari/grpc-gateway
that referenced
this pull request
Apr 9, 2020
Related to grpc-ecosystem#322 Updated protoc-gen-swagger to output enum path parameters correctly Updated protoc-gen-grpc-gateway to handle enum path parameters Regenerated examples Added pathenum proto for an externally imported enum example and verification Added enum_helper.go to handle the lack of enum support in the swagger-codegen-cli 2.2.2 for Go, see swagger-api/swagger-codegen#5635 Fixed browser integration test cases Updated bazel config Fixed last, faulty bazel config Updated integration test case to test both index == 0 and index > 0 for enums
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
and./bin/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0
branch for breaking (non-backward compatible) changes.Description of the PR
Fixes #4459
Adding enum generation support for golang. After some investigation, it turns out the missing key to actually getting the enum value support for the mustache fields was to call
postProcessModelsEnum()
before returning theobjs
result in the client-generator'spostProcessModels()
function.Derived from #5631.
@wing328
@antihax