Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions plugins/grpc-ecosystem/openapiv3/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source:
github:
owner: grpc-ecosystem
repository: grpc-gateway
2 changes: 2 additions & 0 deletions plugins/grpc-ecosystem/openapiv3/v2.30.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
15 changes: 15 additions & 0 deletions plugins/grpc-ecosystem/openapiv3/v2.30.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# syntax=docker/dockerfile:1.24
FROM --platform=$BUILDPLATFORM golang:1.26.6-trixie@sha256:b75d466dd608587fd66cca705a307ba65b889827d06ad61d6a75f0482b51b7c7 AS build

ARG TARGETOS TARGETARCH
ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH

RUN --mount=type=cache,target=/go/pkg/mod \
go install -ldflags="-s -w" -trimpath github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv3@v2.30.0 \
&& mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-openapiv3 /go/bin/protoc-gen-openapiv3 || true

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link /go/bin/protoc-gen-openapiv3 /
USER nobody
ENTRYPOINT [ "/protoc-gen-openapiv3" ]
7 changes: 7 additions & 0 deletions plugins/grpc-ecosystem/openapiv3/v2.30.0/buf.plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: v1
name: buf.build/grpc-ecosystem/openapiv3
plugin_version: v2.30.0
source_url: https://github.com/grpc-ecosystem/grpc-gateway
description: Generates OpenAPI v3 definitions for Protobuf services.
spdx_license_id: BSD-3-Clause
license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.30.0/LICENSE
3 changes: 3 additions & 0 deletions tests/plugins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ exec docker run --log-driver=none --rm -i {{.ImageName}}:{{.Version}} "$@"
allowedEmptyPluginSums = map[string]map[string]bool{
"buf.build/bufbuild/validate-java": {"eliza": true, "petapis": true},
"buf.build/grpc-ecosystem/gateway": {"eliza": true, "petapis": true},
"buf.build/grpc-ecosystem/openapiv3": {"eliza": true, "petapis": true},
"buf.build/community/mercari-grpc-federation": {"eliza": true, "petapis": true},
"buf.build/googlecloudplatform/bq-schema": {"eliza": true, "petapis": true},
}
Expand Down Expand Up @@ -154,6 +155,8 @@ func TestGeneration(t *testing.T) {
if semver.Compare(toTest.PluginVersion, "v2.16.0") >= 0 {
testPluginWithImage(t, toTest, "grpc-gateway")
}
case "grpc-ecosystem/openapiv3":
testPluginWithImage(t, toTest, "grpc-gateway")
case "community/mercari-grpc-federation":
switch {
case semver.Compare(toTest.PluginVersion, "v1.4.1") >= 0:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:sDv/LdN7stRRvSCZnvvCnl7pXGppD04NgjjsDGgKboY=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
Loading