Skip to content

Use buf to generate definitions for dependencies #2970

Answered by nicksnyder
metaturso asked this question in Q&A
Discussion options

You must be logged in to vote

buf.yaml is for declaring a Protobuf module. If you have no proto files in your repo, then you don't need a buf.yaml.

If you are just trying to use/call APIs defined in modules outside of your project, then you just need to define and configure your own buf.gen.yaml and call buf generate.

With v1 buf.gen.yaml, if you want to generate code for multiple inputs, you need to call buf generate multiple times (and have a separate buf.gen.yaml for each invocation of buf generate.

We just released a v2 format for buf.gen.yaml which makes this use case easier, so recommend you checking that out too.

For completeness, Generated SDKs are another op…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by metaturso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants