Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ proto:
--template ./protoc-gen-openapiv2/options/buf.gen.yaml \
--path ./protoc-gen-openapiv2/options/annotations.proto \
--path ./protoc-gen-openapiv2/options/openapiv2.proto
buf generate \
--template ./examples/internal/proto/examplepb/opaque.buf.gen.yaml \
--path examples/internal/proto/examplepb/opaque.proto

generate: proto $(ECHO_EXAMPLE_SRCS) $(ABE_EXAMPLE_SRCS) $(UNANNOTATED_ECHO_EXAMPLE_SRCS) $(RESPONSE_BODY_EXAMPLE_SRCS) $(GENERATE_UNBOUND_METHODS_EXAMPLE_SRCS)

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ gRPC-Gateway, and a gRPC server, see
- Automatically translating PATCH requests into Field Mask gRPC requests. See
[the docs](https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/patch_feature/)
for more information.
- [Protobuf Editions](https://protobuf.dev/editions/overview/) support (edition 2023).
- Go [Opaque API](https://go.dev/blog/protobuf-opaque) support.

### No plan to support

Expand Down
4 changes: 4 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ lint:
- examples/internal/proto/examplepb/generated_input.proto
- examples/internal/proto/examplepb/excess_body.proto
- examples/internal/proto/examplepb/non_standard_names.proto
- examples/internal/proto/examplepb/opaque.proto
- examples/internal/proto/examplepb/openapi_merge_a.proto
- examples/internal/proto/examplepb/openapi_merge_b.proto
- examples/internal/proto/examplepb/response_body_service.proto
Expand Down Expand Up @@ -58,6 +59,7 @@ lint:
- examples/internal/proto/examplepb/generated_input.proto
- examples/internal/proto/examplepb/excess_body.proto
- examples/internal/proto/examplepb/non_standard_names.proto
- examples/internal/proto/examplepb/opaque.proto
- examples/internal/proto/examplepb/openapi_merge_a.proto
- examples/internal/proto/examplepb/openapi_merge_b.proto
- examples/internal/proto/examplepb/response_body_service.proto
Expand Down Expand Up @@ -89,6 +91,7 @@ lint:
- examples/internal/proto/examplepb/generated_input.proto
- examples/internal/proto/examplepb/excess_body.proto
- examples/internal/proto/examplepb/non_standard_names.proto
- examples/internal/proto/examplepb/opaque.proto
- examples/internal/proto/examplepb/response_body_service.proto
- examples/internal/proto/examplepb/stream.proto
- examples/internal/proto/examplepb/unannotated_echo_service.proto
Expand All @@ -111,6 +114,7 @@ lint:
- examples/internal/proto/examplepb/generated_input.proto
- examples/internal/proto/examplepb/excess_body.proto
- examples/internal/proto/examplepb/non_standard_names.proto
- examples/internal/proto/examplepb/opaque.proto
- examples/internal/proto/examplepb/openapi_merge_a.proto
- examples/internal/proto/examplepb/openapi_merge_b.proto
- examples/internal/proto/examplepb/response_body_service.proto
Expand Down
2 changes: 2 additions & 0 deletions examples/internal/proto/examplepb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ proto_library(
"generated_output.proto",
"ignore_comment.proto",
"non_standard_names.proto",
"opaque.proto",
"remove_internal_comment.proto",
"response_body_service.proto",
"stream.proto",
Expand Down Expand Up @@ -129,6 +130,7 @@ go_proto_library(
go_library(
name = "examplepb",
srcs = [
"opaque.pb.gw.go",
"openapi_merge_a.pb.go",
"openapi_merge_a.pb.gw.go",
"openapi_merge_a_grpc.pb.go",
Expand Down
17 changes: 17 additions & 0 deletions examples/internal/proto/examplepb/opaque.buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: v2
plugins:
- remote: buf.build/protocolbuffers/go:v1.36.6
out: .
opt:
- paths=source_relative
- default_api_level=API_OPAQUE
- remote: buf.build/grpc/go:v1.5.1
out: .
opt:
- paths=source_relative
- require_unimplemented_servers=false
- local: protoc-gen-grpc-gateway
out: .
opt:
- paths=source_relative
- use_opaque_api=true
Loading
Loading