Skip to content

Commit

Permalink
build: migrate to buf v2
Browse files Browse the repository at this point in the history
  • Loading branch information
miparnisari committed Sep 6, 2024
1 parent 3583905 commit 64c08cb
Show file tree
Hide file tree
Showing 11 changed files with 622 additions and 463 deletions.
39 changes: 19 additions & 20 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
#!/usr/bin/env -S buf generate --template
---
version: v1
version: v2
managed:
enabled: true
go_package_prefix:
default: github.com/openfga/api/proto
except:
- buf.build/googleapis/googleapis
- buf.build/envoyproxy/protoc-gen-validate
- buf.build/grpc-ecosystem/grpc-gateway
disable:
- file_option: go_package
module: buf.build/googleapis/googleapis
- file_option: go_package
module: buf.build/envoyproxy/protoc-gen-validate
- file_option: go_package
module: buf.build/grpc-ecosystem/grpc-gateway
override:
- file_option: go_package_prefix
value: github.com/openfga/api/proto
plugins:
- plugin: buf.build/protocolbuffers/go:v1.34.0
- remote: buf.build/protocolbuffers/go:v1.34.2
out: proto/
opt:
- paths=source_relative
- plugin: buf.build/grpc/go:v1.3.0
opt: paths=source_relative
- remote: buf.build/grpc/go:v1.5.1
out: proto/
opt:
- paths=source_relative
- plugin: buf.build/bufbuild/validate-go:v1.0.4
opt: paths=source_relative
- remote: buf.build/bufbuild/validate-go:v1.1.0
out: proto/
opt:
- paths=source_relative
- plugin: buf.build/grpc-ecosystem/gateway:v2.19.1
opt: paths=source_relative
- remote: buf.build/grpc-ecosystem/gateway:v2.22.0
out: proto/
opt:
- paths=source_relative
- logtostderr=true
- plugin: buf.build/grpc-ecosystem/openapiv2:v2.16.0
- remote: buf.build/grpc-ecosystem/openapiv2:v2.22.0
out: docs/openapiv2
opt:
- openapi_naming_strategy=simple
Expand Down
26 changes: 10 additions & 16 deletions buf.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
version: v1
version: v2
name: buf.build/openfga/api
deps:
- buf.build/envoyproxy/protoc-gen-validate
- buf.build/grpc-ecosystem/grpc-gateway
- buf.build/googleapis/googleapis
breaking:
ignore_unstable_packages: true

- buf.build/grpc-ecosystem/grpc-gateway
lint:
allow_comment_ignores: true
ignore_only:
ENUM_VALUE_UPPER_SNAKE_CASE:
- openfga/v1/errors_ignore.proto
ENUM_VALUE_PREFIX:
- openfga/v1/errors_ignore.proto
ENUM_VALUE_UPPER_SNAKE_CASE:
- openfga/v1/errors_ignore.proto
ENUM_ZERO_VALUE_SUFFIX:
- openfga/v1/errors_ignore.proto
- openfga/v1/errors_ignore.proto
breaking:
except:
- EXTENSION_NO_DELETE
- FIELD_SAME_DEFAULT
ignore_unstable_packages: true
Loading

0 comments on commit 64c08cb

Please sign in to comment.