-
Notifications
You must be signed in to change notification settings - Fork 248
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
Create a Buf plugin for protoc-gen-openapi
#365
Comments
I think this is related to #337. From what I've gathered looking into the code structure and issues, the main obstacle to moving forward with adopting buf is that large clients like kubectl directly depend on this repository and protobuf structure. I found gnostic's protoc-gen-openapi more natural for gRPC-first stack than the grpc-gateway's plugin. Maybe we need to wait for the unbundling of gnostic first before this plugin could be updated. But if IUUC, making protoc-gen-openapi use different protobuf schemas wouldn't break much because openapi annotation schemas are only needed for |
Hi there, So it's not really related to #337, this isn't trying to make gnostic or protoc-gen-openapi use Buf for its dependencies or anything. Basically, Buf has a concept of "remote plugins". They essentially let people who don't want to download the binaries for each protoc plugin use them directly through buf's Schema Registry. They are only there to make it possible to use Hope that clarifies a little bit, but I'm happy to give it another go if not, haha. |
@rauanmayemir That's right - we set up github.com/google/gnostic-models to provide some isolation. I think that has been around long enough now that we can start restructuring and other improvements to work well with Buf. |
Any further thoughts or movement on this? |
Reading up, it looks like this is about pointing |
... or do we need a PR on https://github.com/bufbuild/plugins ? (edit: or an issue like this one bufbuild/plugins#380) |
Hey @timburks 👋 , I can probably help with that (I help maintain bufbuild/plugins). This particular plugin has come up a lot recently, and if you'd like, we can publish it as a Remote Plugin to https://buf.build/plugins which would satisfy the request above. This enables folks to reference the plugin without having to download it locally. Let me know and I can follow up on this. |
There's a few new commits, but the latest tag is |
It would be really nice to have a remote plugin uploaded to Buf's BSR for
protoc-gen-openapi
, so that we can build our OpenAPI 3 schemas from our protobuf schemas using Buf in smaller Docker containers.The
buf.gen.yaml
would essentially look like this:Then, we can just run
buf generate
to spit out all of this stuff from a pretty tiny Docker build step.Like this one.
I'd love to be able to get this one built, it would be a really big help to people like me who are trying to stick to Buf for all their protobuf needs, and using remote plugins reduces the number of required tools to install locally versus using
protoc
locally, and having to install all the relevantprotoc
extensions with it.Thanks! :)
The text was updated successfully, but these errors were encountered: