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

Add protoc-gen-openapi v0.7.0 #844

Merged
merged 3 commits into from
Oct 10, 2023
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/community/google-gnostic-openapi/source.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source:
github:
owner: google
repository: gnostic
2 changes: 2 additions & 0 deletions plugins/community/google-gnostic-openapi/v0.7.0/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!Dockerfile
11 changes: 11 additions & 0 deletions plugins/community/google-gnostic-openapi/v0.7.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# syntax=docker/dockerfile:1.6
FROM golang:1.21.2-bullseye AS build
RUN --mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 \
go install -ldflags="-s -w" -trimpath github.com/google/gnostic/cmd/[email protected]

FROM scratch
COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd
COPY --from=build --link --chown=root:root /go/bin/protoc-gen-openapi .
USER nobody
ENTRYPOINT [ "/protoc-gen-openapi" ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: v1
name: buf.build/community/google-gnostic-openapi
Copy link
Member Author

@mfridman mfridman Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: buf.build/community/google-gnostic-openapi
name: buf.build/community/google-openapi

This alternative drops the "gnostic" from the name, which would be more in line with our existing nomenclature conventions of: {owner}-{name}

Where the repository component {owner} is the upstream GitHub owner and the {name} is usually the name of the plugin minus protoc-gen- prefix.

However, for this particular one having the name "gnostic" in the name makes the most sense given the project's background. For some context:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would like to wait for @pkwarren feedback before publishing this plugin.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer having the gnostic in the name too.

plugin_version: v0.7.0
source_url: https://github.com/google/gnostic
description: Generates an OpenAPI description for a REST API that corresponds to a Protocol Buffer service.
output_languages:
- go
spdx_license_id: Apache-2.0
license_url: https://github.com/google/gnostic/blob/v0.7.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:P12cx29lB4V/YBo1t3C3zLK3sXUkukSW/pODhtMPw/0=
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
h1:P12cx29lB4V/YBo1t3C3zLK3sXUkukSW/pODhtMPw/0=