Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ vendor

# Generated travis files
.travis.yml

1 change: 1 addition & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ package_group(
packages = [
"//protoc-gen-grpc-gateway/...",
"//protoc-gen-openapiv2/...",
"//protoc-gen-openapiv3/...",
],
)

Expand Down
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ install:
go install github.com/bufbuild/buf/cmd/[email protected]
go install \
./protoc-gen-openapiv2 \
./protoc-gen-openapiv3 \
./protoc-gen-grpc-gateway

proto:
Expand All @@ -101,6 +102,16 @@ proto:
# Remove swagger files for openapiv2 definitions, they're unused
rm ./protoc-gen-openapiv2/options/annotations.swagger.json
rm ./protoc-gen-openapiv2/options/openapiv2.swagger.json
rm ./protoc-gen-openapiv2/options/annotations.openapiv3.json
rm ./protoc-gen-openapiv2/options/openapiv2.openapiv3.json
rm ./protoc-gen-openapiv2/options/merged.openapiv3.json
# Remove swagger files for openapiv3 definitions, they're unused
rm ./protoc-gen-openapiv3/options/annotations.swagger.json
rm ./protoc-gen-openapiv3/options/openapiv3.swagger.json
rm ./protoc-gen-openapiv3/options/annotations.openapiv3.json
rm ./protoc-gen-openapiv3/options/openapiv3.openapiv3.json
rm ./protoc-gen-openapiv3/options/merged.openapiv3.json

buf generate \
--template ./examples/internal/proto/examplepb/openapi_merge.buf.gen.yaml \
--path ./examples/internal/proto/examplepb/openapi_merge_a.proto \
Expand Down
86 changes: 85 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,97 @@ http_archive(
],
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

# Use gazelle to declare Go dependencies in Bazel.
# gazelle:repository_macro repositories.bzl%go_repositories

load("//:repositories.bzl", "go_repositories")

go_repository(
name = "com_github_getkin_kin_openapi",
importpath = "github.com/getkin/kin-openapi",
sum = "h1:3ISeLMsQzcb5v26yeJrBcdTCEQTag36ZjaGk7MIRUwk=",
version = "v0.132.0",
)

go_repository(
name = "com_github_go_openapi_jsonpointer",
importpath = "github.com/go-openapi/jsonpointer",
sum = "h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ=",
version = "v0.21.0",
)

go_repository(
name = "com_github_go_openapi_swag",
importpath = "github.com/go-openapi/swag",
sum = "h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=",
version = "v0.23.0",
)

go_repository(
name = "com_github_go_test_deep",
importpath = "github.com/go-test/deep",
sum = "h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=",
version = "v1.0.8",
)

go_repository(
name = "com_github_gorilla_mux",
importpath = "github.com/gorilla/mux",
sum = "h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=",
version = "v1.8.0",
)

go_repository(
name = "com_github_josharian_intern",
importpath = "github.com/josharian/intern",
sum = "h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=",
version = "v1.0.0",
)

go_repository(
name = "com_github_mailru_easyjson",
importpath = "github.com/mailru/easyjson",
sum = "h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=",
version = "v0.7.7",
)

go_repository(
name = "com_github_mohae_deepcopy",
importpath = "github.com/mohae/deepcopy",
sum = "h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw=",
version = "v0.0.0-20170929034955-c48cc78d4826",
)

go_repository(
name = "com_github_oasdiff_yaml",
importpath = "github.com/oasdiff/yaml",
sum = "h1:G7ERwszslrBzRxj//JalHPu/3yz+De2J+4aLtSRlHiY=",
version = "v0.0.0-20250309154309-f31be36b4037",
)

go_repository(
name = "com_github_oasdiff_yaml3",
importpath = "github.com/oasdiff/yaml3",
sum = "h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c=",
version = "v0.0.0-20250309153720-d2182401db90",
)

go_repository(
name = "com_github_perimeterx_marshmallow",
importpath = "github.com/perimeterx/marshmallow",
sum = "h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s=",
version = "v1.1.5",
)

go_repository(
name = "com_github_ugorji_go_codec",
importpath = "github.com/ugorji/go/codec",
sum = "h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0=",
version = "v1.2.7",
)

go_repositories()

# This must be invoked after our explicit dependencies
Expand Down
2 changes: 2 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ plugins:
out: .
opt:
- allow_repeated_fields_in_body=true
- local: protoc-gen-openapiv3
out: .
Loading