Skip to content

Commit

Permalink
protoc-gen-openapiv2: remove path parameters from body parameters (#2553
Browse files Browse the repository at this point in the history
)

* Upgrade Bazel to support compiling protoc on macOS 12. See protocolbuffers/protobuf#8884

* Fix 404 error for rules_proto

* Remove path parameters from body parameters. Fixes #1670

* Updated generated files

* Update protoc-gen-openapiv2/internal/genopenapi/template.go

Co-authored-by: Johan Brandhorst-Satzkorn <[email protected]>

* Update protoc-gen-openapiv2/internal/genopenapi/template.go

Co-authored-by: Johan Brandhorst-Satzkorn <[email protected]>

* fix(deps): update google.golang.org/genproto commit hash to 43724f9

* fix(deps): update golang.org/x/oauth2 commit hash to ee48083

* -Use location when looking up message for field.
-Align tests with new behaviour.

* Add new generated files.

* - Return errors instead of panic()
- Use field comments instead of message when available

* Generated files without re-formatting.

* -Fix missing reference to schema for body field (regression in this PR)
-Started in fixing generated "required" containing "snake_case"

* -Fix documentation
-Update generated files

* -Fix description
-Update generated files
-Use JsonName where available
-Added test for subPathParams

* Fix test

* Fix linter error.

* Paragraph deliminator as a constant.

Co-authored-by: Johan Brandhorst-Satzkorn <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
  • Loading branch information
3 people authored Mar 2, 2022
1 parent db9c664 commit bd0d991
Show file tree
Hide file tree
Showing 30 changed files with 3,089 additions and 926 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.1
4.2.2
8 changes: 4 additions & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ bazel_skylib_workspace()

http_archive(
name = "rules_proto",
sha256 = "90eb1ae78899b1e261317448ac3dc8d0cff8a70f4217a06a8cefa0e74387e8fd",
strip_prefix = "rules_proto-0bc8db13f8dc8f5d435be07e276712db1ca11a91",
sha256 = "66bfdf8782796239d3875d37e7de19b1d94301e8972b3cbd2446b332429b4df1",
strip_prefix = "rules_proto-4.0.0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/0bc8db13f8dc8f5d435be07e276712db1ca11a91.tar.gz",
"https://github.com/bazelbuild/rules_proto/archive/0bc8db13f8dc8f5d435be07e276712db1ca11a91.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz",
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0.tar.gz",
],
)

Expand Down
15 changes: 14 additions & 1 deletion examples/internal/clients/abe/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ go_library(
"configuration.go",
"enum_helper.go",
"model_a_bit_of_everything.go",
"model_a_bit_of_everything_1.go",
"model_a_bit_of_everything_2.go",
"model_a_bit_of_everything_3.go",
"model_a_bit_of_everything_4.go",
"model_a_bit_of_everything_5.go",
"model_a_bit_of_everything_6.go",
"model_a_bit_of_everything_7.go",
"model_a_bit_of_everything_8.go",
"model_a_bit_of_everything_nested.go",
"model_book.go",
"model_examplepb_a_bit_of_everything.go",
"model_examplepb_a_bit_of_everything_repeated.go",
"model_examplepb_body.go",
Expand All @@ -21,13 +30,17 @@ go_library(
"model_examplepb_error_object.go",
"model_examplepb_error_response.go",
"model_examplepb_numeric_enum.go",
"model_examplepb_update_v2_request.go",
"model_message_path_enum_nested_path_enum.go",
"model_nested_deep_enum.go",
"model_pathenum_path_enum.go",
"model_protobuf_any.go",
"model_rpc_status.go",
"model_sub_string_message.go",
"model_the_book_to_update_.go",
"model_the_book_to_update__1.go",
"model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask.go",
"model_update_v2_request_request_for_update_includes_the_message_and_the_update_mask_1.go",
"model_v1exampledeep_pathsingle_nested_name_single_nested.go",
"response.go",
],
importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/clients/abe",
Expand Down
Loading

0 comments on commit bd0d991

Please sign in to comment.