Adding new plugin protoc-gen-gogo-gateway #586
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.
protoc-gen-gogo-gateway
This plugin fixes an issue where gogoproto.customname is not compatible with
protoc-gen-grpc-gateway, when this field is also referenced as a path parameter.
This happens frequently with id field of an object. Generator by default uses
CamelCase (Id) while go advises to ID to be used. gogoproto.customname helps
the generator to adjust the fieldname, but protoc-gen-grpc-gateway does not know
the field is altered and keep using CamelCase version (Id).
How it works:
This new plugin is just a wrapper around protoc-gen-grpc-gateway.
protoc
->protoc-gen-gogo-gateway
->protoc-gen-grpc-gateway
Usage:
Use protoc-gen-gogo-gateway instead of protoc-gen-grpc-gateway