Skip to content

Commit

Permalink
Generate .jsonschema instead of .json (#155)
Browse files Browse the repository at this point in the history
* Generate .jsonschema instead of .json

* Addressed reviewer comments
  • Loading branch information
rvinfoblox authored Aug 25, 2023
1 parent eeea4b1 commit e8adf1d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The docker image to generate Golang code from Protol Buffer.
FROM golang:1.17.0-alpine3.14 as builder
FROM golang:1.18.10-alpine3.17 as builder
LABEL intermediate=true
MAINTAINER DL NGP-App-Infra-API <[email protected]>

Expand Down Expand Up @@ -60,8 +60,7 @@ RUN go install github.com/gogo/protobuf/protoc-gen-gogoslick
RUN go install github.com/gogo/protobuf/protoc-gen-gogotypes
RUN go install github.com/gogo/protobuf/protoc-gen-gostring
ENV GO111MODULE=on
RUN go get github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@switch_jsonschema_library
RUN go install github.com/chrusty/protoc-gen-jsonschema/cmd/protoc-gen-jsonschema@switch_jsonschema_library
RUN go install github.com/chrusty/protoc-gen-jsonschema/cmd/[email protected]
ENV GO111MODULE=off
RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
RUN go install github.com/envoyproxy/protoc-gen-validate
Expand Down Expand Up @@ -93,10 +92,10 @@ RUN go get github.com/go-openapi/spec && \
cd grpc-gateway/protoc-gen-swagger && go build -o /out/usr/bin/protoc-gen-swagger main.go

ENV GO111MODULE=on

# Build with infoblox atlas_patch.
RUN cd ${GOPATH}/src/github.com/infobloxopen && git clone --single-branch -b v1.0.1 https://github.com/infobloxopen/atlas-openapiv2-patch.git && \
cd ${GOPATH}/src/github.com/infobloxopen/atlas-openapiv2-patch && go mod vendor && go build -o /out/usr/bin/atlas_patch ./cmd/server/.
ENV GO111MODULE=on

RUN mkdir -p /out/protos && \
find ${GOPATH}/src -name "*.proto" -exec cp --parents {} /out/protos \;
Expand Down

0 comments on commit e8adf1d

Please sign in to comment.