Skip to content

Commit

Permalink
add grpc-ecosystem/openapiv2 plugin (#293)
Browse files Browse the repository at this point in the history
Add the protoc-gen-openapiv2 plugin from grpc-gateway.

Fixes #250.
  • Loading branch information
pkwarren authored Jan 5, 2023
1 parent 73d64df commit a9bb689
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/grpc-ecosystem/openapiv2/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/openapiv2/v2.15.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
11 changes: 11 additions & 0 deletions plugins/grpc-ecosystem/openapiv2/v2.15.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# syntax=docker/dockerfile:1.4
FROM golang:1.19.4-bullseye AS build
RUN --mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 \
go install -ldflags="-s -w" -trimpath github.com/grpc-ecosystem/grpc-gateway/v2/[email protected]

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link /go/bin/protoc-gen-openapiv2 /
USER nobody
ENTRYPOINT [ "/protoc-gen-openapiv2" ]
7 changes: 7 additions & 0 deletions plugins/grpc-ecosystem/openapiv2/v2.15.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/openapiv2
plugin_version: v2.15.0
source_url: https://github.com/grpc-ecosystem/grpc-gateway
description: Generates OpenAPI definitions for Protobuf services.
spdx_license_id: BSD-3-Clause
license_url: https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.15.0/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:UttB5XSQcdk/XyJbzkI9uqHCv5StxSjK0u5mrWJweoU=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:kbnot+zVGjxK+SAIaEjtKgvlHNA+4RVmP6bjvSYh9JA=

0 comments on commit a9bb689

Please sign in to comment.