diff --git a/plugins/community/cjermain-pydantic/source.yaml b/plugins/community/cjermain-pydantic/source.yaml new file mode 100644 index 000000000..d29eef1fe --- /dev/null +++ b/plugins/community/cjermain-pydantic/source.yaml @@ -0,0 +1,4 @@ +source: + github: + owner: cjermain + repository: protoc-gen-pydantic diff --git a/plugins/community/cjermain-pydantic/v0.10.0/.dockerignore b/plugins/community/cjermain-pydantic/v0.10.0/.dockerignore new file mode 100644 index 000000000..5d0f124ff --- /dev/null +++ b/plugins/community/cjermain-pydantic/v0.10.0/.dockerignore @@ -0,0 +1,2 @@ +* +!Dockerfile diff --git a/plugins/community/cjermain-pydantic/v0.10.0/Dockerfile b/plugins/community/cjermain-pydantic/v0.10.0/Dockerfile new file mode 100644 index 000000000..6d7552cdb --- /dev/null +++ b/plugins/community/cjermain-pydantic/v0.10.0/Dockerfile @@ -0,0 +1,15 @@ +# syntax=docker/dockerfile:1.17 +FROM --platform=$BUILDPLATFORM golang:1.26.1-bookworm 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/cjermain/protoc-gen-pydantic@v0.10.0 \ + && mv /go/bin/${GOOS}_${GOARCH}/protoc-gen-pydantic /go/bin/protoc-gen-pydantic || true + +FROM scratch +COPY --from=build --link --chown=root:root /etc/passwd /etc/passwd +COPY --from=build --link --chown=root:root /go/bin/protoc-gen-pydantic . +USER nobody +ENTRYPOINT [ "/protoc-gen-pydantic" ] diff --git a/plugins/community/cjermain-pydantic/v0.10.0/buf.plugin.yaml b/plugins/community/cjermain-pydantic/v0.10.0/buf.plugin.yaml new file mode 100644 index 000000000..a007f3470 --- /dev/null +++ b/plugins/community/cjermain-pydantic/v0.10.0/buf.plugin.yaml @@ -0,0 +1,16 @@ +version: v1 +name: buf.build/community/cjermain-pydantic +plugin_version: v0.10.0 +source_url: https://github.com/cjermain/protoc-gen-pydantic +integration_guide_url: https://cjermain.github.io/protoc-gen-pydantic/ +description: Generates Pydantic v2 model definitions from .proto files with type-safe validation, well-known type mappings, and buf.validate constraint translation. +output_languages: + - python +spdx_license_id: Apache-2.0 +license_url: https://github.com/cjermain/protoc-gen-pydantic/blob/v0.10.0/LICENSE +registry: + python: + package_type: stub-only + requires_python: ">=3.10" + deps: + - "pydantic>=2.0" diff --git a/tests/testdata/buf.build/community/cjermain-pydantic/v0.10.0/eliza/plugin.sum b/tests/testdata/buf.build/community/cjermain-pydantic/v0.10.0/eliza/plugin.sum new file mode 100644 index 000000000..c2a4d26bd --- /dev/null +++ b/tests/testdata/buf.build/community/cjermain-pydantic/v0.10.0/eliza/plugin.sum @@ -0,0 +1 @@ +h1:4KPRO9fUzdQ3ERBWUNcHNQn/FdE1IQnOjXyh/29vWpk= diff --git a/tests/testdata/buf.build/community/cjermain-pydantic/v0.10.0/petapis/plugin.sum b/tests/testdata/buf.build/community/cjermain-pydantic/v0.10.0/petapis/plugin.sum new file mode 100644 index 000000000..3f262886c --- /dev/null +++ b/tests/testdata/buf.build/community/cjermain-pydantic/v0.10.0/petapis/plugin.sum @@ -0,0 +1 @@ +h1:D8nh27QhugeOkZPI2vDu/kgtQRzYrnB3XvAfQ+PykaY=