-
Notifications
You must be signed in to change notification settings - Fork 13
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
Plugin request for Buf Schema Registry: protopatch #858
Comments
Thanks for filing an issue. I'm afraid this plugin won't work as a Remote Plugin because it shells out other It's a neat plugin, but it's best run locally. ps. For the enum issue, that should be solved in the generator itself (at least with an opt-in option to maintain compatibility). There's an issue to track this golang/protobuf#513 |
It would still be nice to have a BSR repo. Usage requires I was able to get it working by replacing
with
and adding /proto/patch/go.proto to my project. Looks like someone else made their own BSR repo for this: https://buf.build/nvxx/protopatch/tree/main Edit:
Just don't forget to |
Hi, author of protopatch. I'm happy to help with necessary integrations if folks want to use it with Buf. |
This plugin allows to wrap calls of code generators and patch them before writing. This allows users to circumvent most syntax issues that come with using protobuf and Go code generation. For example,
item_id
is parsed toItemId
insteadItemID
as per Go's style guide.Another glaring issue is enum types which generate horrendous Go types as follows:
Which is compiled as
EnumExample_ENUM_EXAMPLE_UNSPECIFIED
.Both of these issues and other ugly syntax issues can be solved with this plugin. The plugin is actively maintained and would be a great addition to the buf ecosystem.
Mandatory
Where is the source code for the plugin?
https://github.com/alta/protopatch
Optional
Does the plugin have a valid semver version?
v0.5.3
The text was updated successfully, but these errors were encountered: