Skip to content
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

Update example buf.gen.yaml #3522

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,27 +467,27 @@ plugin generation looks like this:
```yaml
version: v1
plugins:
- remote: buf.build/library/plugins/go:v1.27.1-1
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: gen/go
opt:
- paths=source_relative
- remote: buf.build/library/plugins/go-grpc:v1.1.0-2
- plugin: buf.build/grpc/go:v1.3.0
out: gen/go
opt:
- paths=source_relative
- remote: buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.6.0-1
- plugin: buf.build/grpc-ecosystem/gateway:v2.16.2
out: gen/go
opt:
- paths=source_relative
- remote: buf.build/grpc-ecosystem/plugins/openapiv2:v2.6.0-1
- plugin: buf.build/grpc-ecosystem/openapiv2:v2.16.2
out: gen/openapiv2
```

This requires no local installation of any plugins. Be careful to use the same
version of the generator as the runtime library, i.e. if using `v2.6.0-1`, run
version of the generator as the runtime library, i.e. if using `v2.16.2`, run

```shell
$ go get github.com/grpc-ecosystem/grpc-gateway/v2@v2.6.0
$ go get github.com/grpc-ecosystem/grpc-gateway/v2@v2.16.2
```

To get the same version of the runtime in your `go.mod`.
Expand Down
Loading