diff --git a/.circleci/config.yml b/.circleci/config.yml index 1136d19526b..3836b4c791d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ commands: executors: build-env: environment: - ## Split key to avoid github from revoking it + ## Split key to avoid github revoking it password0: '99544cdcb19ad4e3fd64' password1: '3ec86b2e5a431be2d72c' GLOG_logtostderr: '1' @@ -84,8 +84,22 @@ jobs: working_directory: /src/grpc-gateway steps: - checkout - - run: go get golang.org/x/lint/golint - - run: make lint + - restore_cache: + keys: + - v1-staticcheck-cache-{{ checksum "go.sum" }} + - v1-staticcheck-cache- + - run: + name: Install staticcheck outside local module + command: | + cd $(mktemp -d) && + go mod init tmp && + go get honnef.co/go/tools/cmd/staticcheck + - run: staticcheck ./... + - save_cache: + key: v1-staticcheck-cache-{{ checksum "go.sum" }} + paths: + - /root/.cache/go-build + - /root/.cache/staticcheck fuzzit: docker: - image: fuzzitdev/fuzzit:golang1.12-stretch-llvm9 @@ -106,16 +120,22 @@ jobs: - configure_bazel - run: name: Check that Bazel BUILD files are up-to-date - command: 'bazel run //:gazelle -- --mode=diff || - (echo "ERROR: Bazel files out-of-date, please run \`bazel run :gazelle\`" >&2; exit 1)' + command: | + bazel run //:gazelle && + git diff --exit-code - run: - name: Run tests with Bazel - command: bazel test //... + name: Check that repositories.bzl is up-to-date + command: | + bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories && + git diff --exit-code - run: name: Check formatting of Bazel BUILD files - command: 'bazel run //:buildifier_check || - (echo "ERROR: Bazel files not formatted, please run \`bazel run :buildifier\`" >&2; exit 1)' - when: always + command: | + bazel run //:buildifier && + git diff --exit-code + - run: + name: Run tests with Bazel + command: bazel test //... - save_cache: key: v2-bazel-cache-{{ checksum "repositories.bzl" }} paths: @@ -131,7 +151,7 @@ jobs: cd $(mktemp -d) && go mod init tmp && go get golang.org/x/exp/cmd/gorelease@latest - - run: gorelease + - run: gorelease -base=v2.0.0-alpha.2 release: executor: build-env working_directory: /src/grpc-gateway @@ -182,7 +202,7 @@ workflows: - update-repositoriesbzl: filters: branches: - only: /renovate\/.+/ + only: /renovate\/v2-.+/ tags: ignore: /.*/ - regenerate: @@ -192,7 +212,7 @@ workflows: - update-repositoriesbzl filters: branches: - only: /renovate\/master-.+/ + only: /renovate\/v2-.+/ tags: ignore: /.*/ diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 9cb92f9eecc..23f0f71a680 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -6,11 +6,11 @@ ```sh go get -u github.com/grpc-ecosystem/grpc-gateway ``` -- [ ] Delete the `protoc-gen-grpc-gateway` and `protoc-gen-swagger` binary from your `PATH`, +- [ ] Delete the `protoc-gen-grpc-gateway` and `protoc-gen-openapiv2` binary from your `PATH`, and reinstall the latest versions: ```sh go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway - go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger + go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2 ``` ## I still have a problem! diff --git a/.goreleaser.yml b/.goreleaser.yml index bcc63e544d3..ffbe2430c71 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -10,9 +10,9 @@ builds: - windows goarch: - amd64 - - main: ./protoc-gen-swagger/main.go - id: protoc-gen-swagger - binary: protoc-gen-swagger + - main: ./protoc-gen-openapiv2/main.go + id: protoc-gen-openapiv2 + binary: protoc-gen-openapiv2 env: - CGO_ENABLED=0 goos: diff --git a/BUILD b/BUILD index 08af40b556e..b8731f8737f 100644 --- a/BUILD +++ b/BUILD @@ -1,5 +1,6 @@ load("@bazel_gazelle//:def.bzl", "gazelle") load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier") +load("@io_bazel_rules_go//proto:compiler.bzl", "go_proto_compiler") buildifier( name = "buildifier", @@ -11,9 +12,10 @@ buildifier( ) # gazelle:exclude third_party -# gazelle:exclude vendor # gazelle:exclude _output -# gazelle:prefix github.com/grpc-ecosystem/grpc-gateway +# gazelle:prefix github.com/grpc-ecosystem/grpc-gateway/v2 +# gazelle:go_proto_compilers //:go_apiv2 +# gazelle:go_grpc_compilers //:go_apiv2, //:go_grpc gazelle(name = "gazelle") @@ -21,6 +23,61 @@ package_group( name = "generators", packages = [ "//protoc-gen-grpc-gateway/...", - "//protoc-gen-swagger/...", + "//protoc-gen-openapiv2/...", + ], +) + +go_proto_compiler( + name = "go_apiv2", + options = [ + "paths=source_relative", + ], + plugin = "@org_golang_google_protobuf//cmd/protoc-gen-go", + suffix = ".pb.go", + visibility = ["//visibility:public"], + deps = [ + "@com_github_golang_protobuf//proto:go_default_library", + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:api_go_proto", + "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", + "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", + "@io_bazel_rules_go//proto/wkt:field_mask_go_proto", + "@io_bazel_rules_go//proto/wkt:source_context_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", + "@io_bazel_rules_go//proto/wkt:timestamp_go_proto", + "@io_bazel_rules_go//proto/wkt:type_go_proto", + "@io_bazel_rules_go//proto/wkt:wrappers_go_proto", + "@org_golang_google_protobuf//reflect/protoreflect:go_default_library", + "@org_golang_google_protobuf//runtime/protoimpl:go_default_library", + ], +) + +go_proto_compiler( + name = "go_grpc", + options = [ + "paths=source_relative", + "require_unimplemented_servers=false", + ], + plugin = "@org_golang_google_grpc_cmd_protoc_gen_go_grpc//:protoc-gen-go-grpc", + suffix = "_grpc.pb.go", + visibility = ["//visibility:public"], + deps = [ + "@io_bazel_rules_go//proto/wkt:any_go_proto", + "@io_bazel_rules_go//proto/wkt:api_go_proto", + "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", + "@io_bazel_rules_go//proto/wkt:descriptor_go_proto", + "@io_bazel_rules_go//proto/wkt:duration_go_proto", + "@io_bazel_rules_go//proto/wkt:empty_go_proto", + "@io_bazel_rules_go//proto/wkt:field_mask_go_proto", + "@io_bazel_rules_go//proto/wkt:source_context_go_proto", + "@io_bazel_rules_go//proto/wkt:struct_go_proto", + "@io_bazel_rules_go//proto/wkt:timestamp_go_proto", + "@io_bazel_rules_go//proto/wkt:type_go_proto", + "@io_bazel_rules_go//proto/wkt:wrappers_go_proto", + "@org_golang_google_grpc//:go_default_library", + "@org_golang_google_grpc//codes:go_default_library", + "@org_golang_google_grpc//status:go_default_library", ], ) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e72fd9898c..4adc04a5915 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ # Change Log -## [v1.15.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.15.0) (2020-09-18) -[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.8...v1.15.0) +## [v2.0.0-beta.5](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2.0.0-beta.5) (2020-09-24) +[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.0.0-beta.4...v2.0.0-beta.5) **Closed issues:** +- Sending NULL for int64/uint64 types calls gRPC server with zero-value [\#1681](https://github.com/grpc-ecosystem/grpc-gateway/issues/1681) +- protoc-gen-swagger: allow `-output` dir [\#1679](https://github.com/grpc-ecosystem/grpc-gateway/issues/1679) - Empty json array is passed as nil [\#1673](https://github.com/grpc-ecosystem/grpc-gateway/issues/1673) - Lightweight support for custom protobuf annotations on RPCs [\#1666](https://github.com/grpc-ecosystem/grpc-gateway/issues/1666) - undefined: runtime.ServerTransportStream [\#1664](https://github.com/grpc-ecosystem/grpc-gateway/issues/1664) @@ -12,21 +14,6 @@ - Add base\_path as constant in generated gateway files [\#1650](https://github.com/grpc-ecosystem/grpc-gateway/issues/1650) - Support service definitions without any annotations. [\#1649](https://github.com/grpc-ecosystem/grpc-gateway/issues/1649) - proto directory names preclude using protos in python code [\#1647](https://github.com/grpc-ecosystem/grpc-gateway/issues/1647) - -**Merged pull requests:** - -- Regenerate files [\#1676](https://github.com/grpc-ecosystem/grpc-gateway/pull/1676) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- End default response desc with period [\#1663](https://github.com/grpc-ecosystem/grpc-gateway/pull/1663) ([rubda](https://github.com/rubda)) -- Update golang Docker tag to v1.15.2 \(master\) [\#1657](https://github.com/grpc-ecosystem/grpc-gateway/pull/1657) ([renovate[bot]](https://github.com/apps/renovate)) -- Update module google.golang.org/grpc to v1.32.0 \(master\) [\#1653](https://github.com/grpc-ecosystem/grpc-gateway/pull/1653) ([renovate[bot]](https://github.com/apps/renovate)) -- Generate unbound methods [\#1652](https://github.com/grpc-ecosystem/grpc-gateway/pull/1652) ([plaflamme](https://github.com/plaflamme)) -- Deprecate example field [\#1637](https://github.com/grpc-ecosystem/grpc-gateway/pull/1637) ([johanbrandhorst](https://github.com/johanbrandhorst)) - -## [v1.14.8](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.14.8) (2020-09-03) -[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.7...v1.14.8) - -**Closed issues:** - - Generated files contain calls to methods that don't exist [\#1643](https://github.com/grpc-ecosystem/grpc-gateway/issues/1643) - TestConvertDuration/invalid\_duration failure [\#1630](https://github.com/grpc-ecosystem/grpc-gateway/issues/1630) - `runtime.WithForwardResponseOption\(\)` is not respected [\#1625](https://github.com/grpc-ecosystem/grpc-gateway/issues/1625) @@ -39,23 +26,63 @@ - code: 32603, message `types.Coin` is neither a v1 or v2 Message [\#1603](https://github.com/grpc-ecosystem/grpc-gateway/issues/1603) - protoc-gen-swagger map type filed doesn't support options.openapiv2\_field [\#1601](https://github.com/grpc-ecosystem/grpc-gateway/issues/1601) - 🐛HttpRule is stated in unannotated\_echo\_service.yaml, but warning is still issued [\#1578](https://github.com/grpc-ecosystem/grpc-gateway/issues/1578) +- CVE-2020-14001: Unintended read access in kramdown gem [\#1579](https://github.com/grpc-ecosystem/grpc-gateway/issues/1579) **Merged pull requests:** -- Generate changelog for 1.14.8 [\#1646](https://github.com/grpc-ecosystem/grpc-gateway/pull/1646) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Add ignore for golang.org/x/oauth2 [\#1644](https://github.com/grpc-ecosystem/grpc-gateway/pull/1644) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- fix SendHeader/SetTrailer when use grpc-gateway standalone server \(master\) [\#1639](https://github.com/grpc-ecosystem/grpc-gateway/pull/1639) ([ghostiam](https://github.com/ghostiam)) -- Update golang Docker tag to v1.15.1 \(master\) [\#1634](https://github.com/grpc-ecosystem/grpc-gateway/pull/1634) ([renovate[bot]](https://github.com/apps/renovate)) -- runtime: fix duration test [\#1631](https://github.com/grpc-ecosystem/grpc-gateway/pull/1631) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Update dependency bazel\_skylib to v1.0.3 \(master\) [\#1618](https://github.com/grpc-ecosystem/grpc-gateway/pull/1618) ([renovate[bot]](https://github.com/apps/renovate)) -- Update module google.golang.org/grpc to v1.31.1 \(master\) [\#1614](https://github.com/grpc-ecosystem/grpc-gateway/pull/1614) ([renovate[bot]](https://github.com/apps/renovate)) -- Control warning behavior on unbound methods using a flag [\#1606](https://github.com/grpc-ecosystem/grpc-gateway/pull/1606) ([yousseftelda](https://github.com/yousseftelda)) -- protoc-gen-swagger: fix map field options \(\#1601\) [\#1602](https://github.com/grpc-ecosystem/grpc-gateway/pull/1602) ([yangxikun](https://github.com/yangxikun)) -- protoc-gen-swagger: remove boolean format [\#1597](https://github.com/grpc-ecosystem/grpc-gateway/pull/1597) ([algas](https://github.com/algas)) -- document optional swagger plugin for unannotated grpc\_api\_configuration [\#1588](https://github.com/grpc-ecosystem/grpc-gateway/pull/1588) ([piengeng](https://github.com/piengeng)) - -## [v1.14.7](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.14.7) (2020-08-12) -[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.6...v1.14.7) +- Update dependency com\_github\_bazelbuild\_buildtools to v3.5.0 \(v2\) [\#1690](https://github.com/grpc-ecosystem/grpc-gateway/pull/1690) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 5646d36 \(v2\) [\#1688](https://github.com/grpc-ecosystem/grpc-gateway/pull/1688) ([renovate[bot]](https://github.com/apps/renovate)) +- Add devcontainer.json [\#1687](https://github.com/grpc-ecosystem/grpc-gateway/pull/1687) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update dependency io\_bazel\_rules\_go to v0.24.3 \(v2\) [\#1686](https://github.com/grpc-ecosystem/grpc-gateway/pull/1686) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency bazel\_gazelle to v0.22.1 \(v2\) [\#1685](https://github.com/grpc-ecosystem/grpc-gateway/pull/1685) ([renovate[bot]](https://github.com/apps/renovate)) +- Support generating unbound methods [\#1684](https://github.com/grpc-ecosystem/grpc-gateway/pull/1684) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update google.golang.org/genproto commit hash to b9da36f \(v2\) [\#1682](https://github.com/grpc-ecosystem/grpc-gateway/pull/1682) ([renovate[bot]](https://github.com/apps/renovate)) +- Fix link in migration doc [\#1678](https://github.com/grpc-ecosystem/grpc-gateway/pull/1678) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update google.golang.org/genproto commit hash to d0d6055 \(v2\) [\#1677](https://github.com/grpc-ecosystem/grpc-gateway/pull/1677) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to bb4cff5 \(v2\) [\#1674](https://github.com/grpc-ecosystem/grpc-gateway/pull/1674) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to f6a2fa7 \(v2\) [\#1672](https://github.com/grpc-ecosystem/grpc-gateway/pull/1672) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 9f80d06 \(v2\) [\#1671](https://github.com/grpc-ecosystem/grpc-gateway/pull/1671) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 75d14da \(v2\) [\#1669](https://github.com/grpc-ecosystem/grpc-gateway/pull/1669) ([renovate[bot]](https://github.com/apps/renovate)) +- refactor: upgrade protoc-gen-grpc-gateway to use the new Go code generator [\#1668](https://github.com/grpc-ecosystem/grpc-gateway/pull/1668) ([adambabik](https://github.com/adambabik)) +- End default swagger response desc with period - v2 [\#1667](https://github.com/grpc-ecosystem/grpc-gateway/pull/1667) ([rubda](https://github.com/rubda)) +- Add support for OpenAPI YAML annotations [\#1665](https://github.com/grpc-ecosystem/grpc-gateway/pull/1665) ([jasonewang](https://github.com/jasonewang)) +- Update google.golang.org/genproto commit hash to 645f7a4 \(v2\) [\#1662](https://github.com/grpc-ecosystem/grpc-gateway/pull/1662) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 8ad3c7e \(v2\) [\#1661](https://github.com/grpc-ecosystem/grpc-gateway/pull/1661) ([renovate[bot]](https://github.com/apps/renovate)) +- Update golang Docker tag to v1.15.2 \(v2\) [\#1658](https://github.com/grpc-ecosystem/grpc-gateway/pull/1658) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency io\_bazel\_rules\_go to v0.24.2 \(v2\) [\#1656](https://github.com/grpc-ecosystem/grpc-gateway/pull/1656) ([renovate[bot]](https://github.com/apps/renovate)) +- Update module google.golang.org/grpc to v1.32.0 \(v2\) [\#1654](https://github.com/grpc-ecosystem/grpc-gateway/pull/1654) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 0bd0a95 \(v2\) [\#1648](https://github.com/grpc-ecosystem/grpc-gateway/pull/1648) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency bazel\_gazelle to v0.22.0 \(v2\) [\#1622](https://github.com/grpc-ecosystem/grpc-gateway/pull/1622) ([renovate[bot]](https://github.com/apps/renovate)) +- Update golang.org/x/oauth2 [\#1645](https://github.com/grpc-ecosystem/grpc-gateway/pull/1645) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update google.golang.org/genproto commit hash to 9bfcb51 \(v2\) [\#1642](https://github.com/grpc-ecosystem/grpc-gateway/pull/1642) ([renovate[bot]](https://github.com/apps/renovate)) +- fix SendHeader/SetTrailer when use grpc-gateway standalone server \(v2\) [\#1638](https://github.com/grpc-ecosystem/grpc-gateway/pull/1638) ([ghostiam](https://github.com/ghostiam)) +- Change example field [\#1636](https://github.com/grpc-ecosystem/grpc-gateway/pull/1636) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update golang Docker tag to v1.15.1 \(v2\) [\#1635](https://github.com/grpc-ecosystem/grpc-gateway/pull/1635) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency io\_bazel\_rules\_go to v0.24.1 \(v2\) [\#1633](https://github.com/grpc-ecosystem/grpc-gateway/pull/1633) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to b3bf27a \(v2\) [\#1632](https://github.com/grpc-ecosystem/grpc-gateway/pull/1632) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to d751682 \(v2\) [\#1629](https://github.com/grpc-ecosystem/grpc-gateway/pull/1629) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 2bf3329 \(v2\) [\#1626](https://github.com/grpc-ecosystem/grpc-gateway/pull/1626) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 73b5761 \(v2\) [\#1624](https://github.com/grpc-ecosystem/grpc-gateway/pull/1624) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency io\_bazel\_rules\_go to v0.24.0 \(v2\) [\#1623](https://github.com/grpc-ecosystem/grpc-gateway/pull/1623) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to ac2560b \(v2\) [\#1620](https://github.com/grpc-ecosystem/grpc-gateway/pull/1620) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency bazel\_skylib to v1.0.3 \(v2\) [\#1619](https://github.com/grpc-ecosystem/grpc-gateway/pull/1619) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 8632dd7 \(v2\) [\#1616](https://github.com/grpc-ecosystem/grpc-gateway/pull/1616) ([renovate[bot]](https://github.com/apps/renovate)) +- Update module google.golang.org/grpc to v1.31.1 \(v2\) [\#1615](https://github.com/grpc-ecosystem/grpc-gateway/pull/1615) ([renovate[bot]](https://github.com/apps/renovate)) +- Update module google/go-cmp to v0.5.2 \(v2\) [\#1611](https://github.com/grpc-ecosystem/grpc-gateway/pull/1611) ([renovate[bot]](https://github.com/apps/renovate)) +- Cherry-pick \#1606 against v2 [\#1609](https://github.com/grpc-ecosystem/grpc-gateway/pull/1609) ([yousseftelda](https://github.com/yousseftelda)) +- protoc-gen-openapiv2: fix map field options \(\#1601\) [\#1604](https://github.com/grpc-ecosystem/grpc-gateway/pull/1604) ([yangxikun](https://github.com/yangxikun)) +- Update google.golang.org/genproto commit hash to f69a880 \(v2\) [\#1600](https://github.com/grpc-ecosystem/grpc-gateway/pull/1600) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 8c09557 \(v2\) [\#1599](https://github.com/grpc-ecosystem/grpc-gateway/pull/1599) ([renovate[bot]](https://github.com/apps/renovate)) +- protoc-gen-openapi: remove boolean format [\#1598](https://github.com/grpc-ecosystem/grpc-gateway/pull/1598) ([algas](https://github.com/algas)) +- Update google.golang.org/genproto commit hash to 1ccf2a5 \(v2\) [\#1596](https://github.com/grpc-ecosystem/grpc-gateway/pull/1596) ([renovate[bot]](https://github.com/apps/renovate)) +- Build FieldMasks for proto Structs and Values [\#1595](https://github.com/grpc-ecosystem/grpc-gateway/pull/1595) ([talanknight](https://github.com/talanknight)) +- Update google.golang.org/genproto commit hash to 2e714ab \(v2\) [\#1593](https://github.com/grpc-ecosystem/grpc-gateway/pull/1593) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency io\_bazel\_rules\_go to v0.23.8 \(v2\) [\#1591](https://github.com/grpc-ecosystem/grpc-gateway/pull/1591) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update golang docker tag \(v2\) [\#1586](https://github.com/grpc-ecosystem/grpc-gateway/pull/1586) ([renovate[bot]](https://github.com/apps/renovate)) +- Update gems v2 [\#1582](https://github.com/grpc-ecosystem/grpc-gateway/pull/1582) ([johanbrandhorst](https://github.com/johanbrandhorst)) + +## [v2.0.0-beta.4](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2.0.0-beta.4) (2020-08-10) +[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.0.0-beta.3...v2.0.0-beta.4) **Fixed bugs:** @@ -63,7 +90,6 @@ **Closed issues:** -- CVE-2020-14001: Unintended read access in kramdown gem [\#1579](https://github.com/grpc-ecosystem/grpc-gateway/issues/1579) - \[v2\] expose defaultHTTPErrorHandler \(and perhaps defaultStreamErrorHandler\) [\#1576](https://github.com/grpc-ecosystem/grpc-gateway/issues/1576) - protoc-gen-swagger: Add prefix to all paths [\#1567](https://github.com/grpc-ecosystem/grpc-gateway/issues/1567) - Generate Swagger description using proto comments. [\#1552](https://github.com/grpc-ecosystem/grpc-gateway/issues/1552) @@ -93,43 +119,127 @@ **Merged pull requests:** -- chore\(deps\): update golang docker tag to v1.14.7 \(master\) [\#1571](https://github.com/grpc-ecosystem/grpc-gateway/pull/1571) ([renovate[bot]](https://github.com/apps/renovate)) -- Only canonicalize header key once in each iteration [\#1564](https://github.com/grpc-ecosystem/grpc-gateway/pull/1564) ([ziyi-yan](https://github.com/ziyi-yan)) -- chore\(deps\): update module google.golang.org/grpc to v1.31.0 \(master\) [\#1561](https://github.com/grpc-ecosystem/grpc-gateway/pull/1561) ([renovate[bot]](https://github.com/apps/renovate)) -- fix slice appendings in generating field mask paths [\#1555](https://github.com/grpc-ecosystem/grpc-gateway/pull/1555) ([houz42](https://github.com/houz42)) -- chore\(deps\): update dependency com\_github\_bazelbuild\_buildtools to v3.4.0 \(master\) [\#1544](https://github.com/grpc-ecosystem/grpc-gateway/pull/1544) ([renovate[bot]](https://github.com/apps/renovate)) -- Eliminate log messages resulting from requests being sent over a Unix Domain Socket [\#1543](https://github.com/grpc-ecosystem/grpc-gateway/pull/1543) ([janzantinge](https://github.com/janzantinge)) -- docs: fix broken screenshot paths [\#1540](https://github.com/grpc-ecosystem/grpc-gateway/pull/1540) ([dufcrule](https://github.com/dufcrule)) -- Update golang Docker tag to v1.14.6 \(master\) [\#1531](https://github.com/grpc-ecosystem/grpc-gateway/pull/1531) ([renovate[bot]](https://github.com/apps/renovate)) -- Adds fqn\_for\_swagger\_name to bazel defs [\#1528](https://github.com/grpc-ecosystem/grpc-gateway/pull/1528) ([chriserickson](https://github.com/chriserickson)) -- Update golang Docker tag to v1.14.5 \(master\) [\#1521](https://github.com/grpc-ecosystem/grpc-gateway/pull/1521) ([renovate[bot]](https://github.com/apps/renovate)) -- protoc-gen-swagger: add example similar to AIP-133 [\#1514](https://github.com/grpc-ecosystem/grpc-gateway/pull/1514) ([jonathaningram](https://github.com/jonathaningram)) -- Parse media type for inbound marshaler [\#1506](https://github.com/grpc-ecosystem/grpc-gateway/pull/1506) ([movsb](https://github.com/movsb)) -- Corrects an invalid test [\#1502](https://github.com/grpc-ecosystem/grpc-gateway/pull/1502) ([yugui](https://github.com/yugui)) -- forward trailers on error only if client send TE header [\#1499](https://github.com/grpc-ecosystem/grpc-gateway/pull/1499) ([strobil](https://github.com/strobil)) -- docs: fix broken season of docs links [\#1497](https://github.com/grpc-ecosystem/grpc-gateway/pull/1497) ([dufcrule](https://github.com/dufcrule)) -- docs: clean up cygwin instructions [\#1490](https://github.com/grpc-ecosystem/grpc-gateway/pull/1490) ([dufcrule](https://github.com/dufcrule)) -- Add `descriptor` to `deps` of `go\_gen\_grpc\_gateway`. [\#1487](https://github.com/grpc-ecosystem/grpc-gateway/pull/1487) ([bartle-stripe](https://github.com/bartle-stripe)) -- Update dependency com\_github\_bazelbuild\_buildtools to v3.3.0 \(master\) [\#1481](https://github.com/grpc-ecosystem/grpc-gateway/pull/1481) ([renovate[bot]](https://github.com/apps/renovate)) -- Standardize way GitHub is written in CONTRIBUTING.md [\#1479](https://github.com/grpc-ecosystem/grpc-gateway/pull/1479) ([dufcrule](https://github.com/dufcrule)) -- Update module google.golang.org/grpc to v1.30.0 \(master\) [\#1476](https://github.com/grpc-ecosystem/grpc-gateway/pull/1476) ([renovate[bot]](https://github.com/apps/renovate)) -- protoc-gen-swagger: Update internal mapping for boolean type [\#1466](https://github.com/grpc-ecosystem/grpc-gateway/pull/1466) ([ozraza](https://github.com/ozraza)) -- Update dependency com\_github\_bazelbuild\_buildtools to v3.2.1 \(master\) [\#1460](https://github.com/grpc-ecosystem/grpc-gateway/pull/1460) ([renovate[bot]](https://github.com/apps/renovate)) -- Fix for referenced enums in field params [\#1453](https://github.com/grpc-ecosystem/grpc-gateway/pull/1453) ([sgtsquiggs](https://github.com/sgtsquiggs)) -- fix rpc comment generation against allow\_merge [\#1445](https://github.com/grpc-ecosystem/grpc-gateway/pull/1445) ([kentdotn](https://github.com/kentdotn)) -- protoc-gen-swagger: Fix message recursion detection [\#1437](https://github.com/grpc-ecosystem/grpc-gateway/pull/1437) ([doylezdead](https://github.com/doylezdead)) -- chore\(deps\): update dependency com\_github\_bazelbuild\_buildtools to v3.2.0 \(master\) [\#1434](https://github.com/grpc-ecosystem/grpc-gateway/pull/1434) ([renovate[bot]](https://github.com/apps/renovate)) -- chore\(deps\): update golang docker tag to v1.14.4 \(master\) [\#1430](https://github.com/grpc-ecosystem/grpc-gateway/pull/1430) ([renovate[bot]](https://github.com/apps/renovate)) -- Add openapi protobuf documentation examples [\#1427](https://github.com/grpc-ecosystem/grpc-gateway/pull/1427) ([bvwells](https://github.com/bvwells)) -- Enable auto merge and automate updates [\#1416](https://github.com/grpc-ecosystem/grpc-gateway/pull/1416) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- added issue template of various forms [\#1411](https://github.com/grpc-ecosystem/grpc-gateway/pull/1411) ([iamrajiv](https://github.com/iamrajiv)) -- fix documentation error introduced by \#1399 [\#1402](https://github.com/grpc-ecosystem/grpc-gateway/pull/1402) ([joesonw](https://github.com/joesonw)) -- Add module generator option [\#1400](https://github.com/grpc-ecosystem/grpc-gateway/pull/1400) ([Humpheh](https://github.com/Humpheh)) -- Fixes 1398: deprecate Regiter\_XXX\_HandlerServer [\#1399](https://github.com/grpc-ecosystem/grpc-gateway/pull/1399) ([joesonw](https://github.com/joesonw)) -- Adding docs about controlling http response status codes [\#1391](https://github.com/grpc-ecosystem/grpc-gateway/pull/1391) ([zhughes3](https://github.com/zhughes3)) +- Generate changelog for beta.4 [\#1577](https://github.com/grpc-ecosystem/grpc-gateway/pull/1577) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- chore\(deps\): update google.golang.org/genproto commit hash to a062522 \(v2\) [\#1574](https://github.com/grpc-ecosystem/grpc-gateway/pull/1574) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update golang docker tag to v1.14.7 \(v2\) [\#1573](https://github.com/grpc-ecosystem/grpc-gateway/pull/1573) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update dependency io\_bazel\_rules\_go to v0.23.7 \(v2\) [\#1572](https://github.com/grpc-ecosystem/grpc-gateway/pull/1572) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to 86f49bd \(v2\) [\#1569](https://github.com/grpc-ecosystem/grpc-gateway/pull/1569) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to 45615f5 \(v2\) [\#1568](https://github.com/grpc-ecosystem/grpc-gateway/pull/1568) ([renovate[bot]](https://github.com/apps/renovate)) +- Only canonicalize header key once in each iteration [\#1565](https://github.com/grpc-ecosystem/grpc-gateway/pull/1565) ([ziyi-yan](https://github.com/ziyi-yan)) +- chore\(deps\): update google.golang.org/genproto commit hash to 8145dea \(v2\) [\#1563](https://github.com/grpc-ecosystem/grpc-gateway/pull/1563) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update module google.golang.org/grpc to v1.31.0 \(v2\) [\#1562](https://github.com/grpc-ecosystem/grpc-gateway/pull/1562) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to 007c33d \(v2\) [\#1560](https://github.com/grpc-ecosystem/grpc-gateway/pull/1560) ([renovate[bot]](https://github.com/apps/renovate)) +- protoc-gen-openapiv2: Fix so that FieldMasks descriptions are correctly generated [\#1558](https://github.com/grpc-ecosystem/grpc-gateway/pull/1558) ([krosen040](https://github.com/krosen040)) +- chore\(deps\): update google.golang.org/genproto commit hash to 053ba62 \(v2\) [\#1557](https://github.com/grpc-ecosystem/grpc-gateway/pull/1557) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to 3dc8dca \(v2\) [\#1554](https://github.com/grpc-ecosystem/grpc-gateway/pull/1554) ([renovate[bot]](https://github.com/apps/renovate)) +- fix slice appending in generating field mask paths [\#1553](https://github.com/grpc-ecosystem/grpc-gateway/pull/1553) ([houz42](https://github.com/houz42)) +- chore\(deps\): update google.golang.org/genproto commit hash to da3ae01 \(v2\) [\#1551](https://github.com/grpc-ecosystem/grpc-gateway/pull/1551) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to 43cab47 \(v2\) [\#1550](https://github.com/grpc-ecosystem/grpc-gateway/pull/1550) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update dependency io\_bazel\_rules\_go to v0.23.6 \(v2\) [\#1548](https://github.com/grpc-ecosystem/grpc-gateway/pull/1548) ([renovate[bot]](https://github.com/apps/renovate)) +- Removed the "invalid remote addr" log \(\#1543\) [\#1546](https://github.com/grpc-ecosystem/grpc-gateway/pull/1546) ([janzantinge](https://github.com/janzantinge)) +- chore\(deps\): update dependency com\_github\_bazelbuild\_buildtools to v3.4.0 \(v2\) [\#1545](https://github.com/grpc-ecosystem/grpc-gateway/pull/1545) ([renovate[bot]](https://github.com/apps/renovate)) +- docs: change back name of file to OpenAPI [\#1542](https://github.com/grpc-ecosystem/grpc-gateway/pull/1542) ([dufcrule](https://github.com/dufcrule)) +- docs: fix broken screenshot paths [\#1541](https://github.com/grpc-ecosystem/grpc-gateway/pull/1541) ([dufcrule](https://github.com/dufcrule)) +- Update google.golang.org/genproto commit hash to 88e3419 \(v2\) [\#1539](https://github.com/grpc-ecosystem/grpc-gateway/pull/1539) ([renovate[bot]](https://github.com/apps/renovate)) +- Update module google/go-cmp to v0.5.1 \(v2\) [\#1537](https://github.com/grpc-ecosystem/grpc-gateway/pull/1537) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 5044d0e \(v2\) [\#1536](https://github.com/grpc-ecosystem/grpc-gateway/pull/1536) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 1244ee2 \(v2\) [\#1534](https://github.com/grpc-ecosystem/grpc-gateway/pull/1534) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency io\_bazel\_rules\_go to v0.23.5 \(v2\) [\#1533](https://github.com/grpc-ecosystem/grpc-gateway/pull/1533) ([renovate[bot]](https://github.com/apps/renovate)) +- Update golang Docker tag to v1.14.6 \(v2\) [\#1532](https://github.com/grpc-ecosystem/grpc-gateway/pull/1532) ([renovate[bot]](https://github.com/apps/renovate)) +- Adds fqn\_for\_swagger\_name to bazel defs [\#1529](https://github.com/grpc-ecosystem/grpc-gateway/pull/1529) ([chriserickson](https://github.com/chriserickson)) +- Update google.golang.org/genproto commit hash to 11fb19a \(v2\) [\#1526](https://github.com/grpc-ecosystem/grpc-gateway/pull/1526) ([renovate[bot]](https://github.com/apps/renovate)) +- protoc-gen-openapiv2: add example for AIP-133 [\#1524](https://github.com/grpc-ecosystem/grpc-gateway/pull/1524) ([jonathaningram](https://github.com/jonathaningram)) +- Update golang Docker tag to v1.14.5 \(v2\) [\#1523](https://github.com/grpc-ecosystem/grpc-gateway/pull/1523) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency io\_bazel\_rules\_go to v0.23.4 \(v2\) [\#1522](https://github.com/grpc-ecosystem/grpc-gateway/pull/1522) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to f631a03 \(v2\) [\#1520](https://github.com/grpc-ecosystem/grpc-gateway/pull/1520) ([renovate[bot]](https://github.com/apps/renovate)) +- Add http routing errors handler [\#1517](https://github.com/grpc-ecosystem/grpc-gateway/pull/1517) ([octo47](https://github.com/octo47)) +- Update google.golang.org/genproto commit hash to 8698661 \(v2\) [\#1516](https://github.com/grpc-ecosystem/grpc-gateway/pull/1516) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 20a17af \(v2\) [\#1515](https://github.com/grpc-ecosystem/grpc-gateway/pull/1515) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 7a2ca40 \(v2\) [\#1512](https://github.com/grpc-ecosystem/grpc-gateway/pull/1512) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 1803610 \(v2\) [\#1511](https://github.com/grpc-ecosystem/grpc-gateway/pull/1511) ([renovate[bot]](https://github.com/apps/renovate)) +- Cherrypick \#1506 [\#1510](https://github.com/grpc-ecosystem/grpc-gateway/pull/1510) ([movsb](https://github.com/movsb)) +- Cherrypick \#1502 [\#1509](https://github.com/grpc-ecosystem/grpc-gateway/pull/1509) ([yugui](https://github.com/yugui)) +- chore\(deps\): update google.golang.org/genproto commit hash to 8e8330b \(v2\) [\#1508](https://github.com/grpc-ecosystem/grpc-gateway/pull/1508) ([renovate[bot]](https://github.com/apps/renovate)) +- cherry-pick \#1499 from master [\#1507](https://github.com/grpc-ecosystem/grpc-gateway/pull/1507) ([strobil](https://github.com/strobil)) +- feat: make default error handlers public [\#1504](https://github.com/grpc-ecosystem/grpc-gateway/pull/1504) ([odsod](https://github.com/odsod)) +- chore\(deps\): update google.golang.org/genproto commit hash to 5779274 \(v2\) [\#1503](https://github.com/grpc-ecosystem/grpc-gateway/pull/1503) ([renovate[bot]](https://github.com/apps/renovate)) +- docs: fix broken season of docs links \(\#1497\) [\#1498](https://github.com/grpc-ecosystem/grpc-gateway/pull/1498) ([dufcrule](https://github.com/dufcrule)) +- chore\(deps\): update google.golang.org/genproto commit hash to 0750642 \(v2\) [\#1496](https://github.com/grpc-ecosystem/grpc-gateway/pull/1496) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to 0939c59 \(v2\) [\#1494](https://github.com/grpc-ecosystem/grpc-gateway/pull/1494) ([renovate[bot]](https://github.com/apps/renovate)) +- docs: clean up cygwin instructions \(\#1490\) [\#1491](https://github.com/grpc-ecosystem/grpc-gateway/pull/1491) ([dufcrule](https://github.com/dufcrule)) +- Update google.golang.org/genproto commit hash to ee7919e \(v2\) [\#1489](https://github.com/grpc-ecosystem/grpc-gateway/pull/1489) ([renovate[bot]](https://github.com/apps/renovate)) +- Standardize way GitHub is written in CONTRIBUTING.md \(\#1479\) [\#1485](https://github.com/grpc-ecosystem/grpc-gateway/pull/1485) ([dufcrule](https://github.com/dufcrule)) +- Update module google.golang.org/protobuf to v1.25.0 \(v2\) [\#1484](https://github.com/grpc-ecosystem/grpc-gateway/pull/1484) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 64a14ca \(v2\) [\#1483](https://github.com/grpc-ecosystem/grpc-gateway/pull/1483) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency com\_github\_bazelbuild\_buildtools to v3.3.0 \(v2\) [\#1482](https://github.com/grpc-ecosystem/grpc-gateway/pull/1482) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to fbb79ea \(v2\) [\#1478](https://github.com/grpc-ecosystem/grpc-gateway/pull/1478) ([renovate[bot]](https://github.com/apps/renovate)) +- Update module google.golang.org/grpc to v1.30.0 \(v2\) [\#1477](https://github.com/grpc-ecosystem/grpc-gateway/pull/1477) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to d0ee0c3 \(v2\) [\#1475](https://github.com/grpc-ecosystem/grpc-gateway/pull/1475) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to bd6e046 \(v2\) [\#1472](https://github.com/grpc-ecosystem/grpc-gateway/pull/1472) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 3e7fca5 \(v2\) [\#1471](https://github.com/grpc-ecosystem/grpc-gateway/pull/1471) ([renovate[bot]](https://github.com/apps/renovate)) +- protoc-gen-swagger: Update internal mapping for boolean type \(\#1466\) [\#1470](https://github.com/grpc-ecosystem/grpc-gateway/pull/1470) ([ozraza](https://github.com/ozraza)) +- Update google.golang.org/genproto commit hash to b414f8b \(v2\) [\#1469](https://github.com/grpc-ecosystem/grpc-gateway/pull/1469) ([renovate[bot]](https://github.com/apps/renovate)) +- Update module google/go-cmp to v0.5.0 \(v2\) [\#1468](https://github.com/grpc-ecosystem/grpc-gateway/pull/1468) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to f1bdc90 \(v2\) [\#1467](https://github.com/grpc-ecosystem/grpc-gateway/pull/1467) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to fc83d8c \(v2\) [\#1464](https://github.com/grpc-ecosystem/grpc-gateway/pull/1464) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to fd031ea \(v2\) [\#1462](https://github.com/grpc-ecosystem/grpc-gateway/pull/1462) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency com\_github\_bazelbuild\_buildtools to v3.2.1 \(v2\) [\#1461](https://github.com/grpc-ecosystem/grpc-gateway/pull/1461) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 7676ae0 \(v2\) [\#1457](https://github.com/grpc-ecosystem/grpc-gateway/pull/1457) ([renovate[bot]](https://github.com/apps/renovate)) +- Create healthcheck.md [\#1456](https://github.com/grpc-ecosystem/grpc-gateway/pull/1456) ([erikperttu](https://github.com/erikperttu)) +- Create tracing.md [\#1455](https://github.com/grpc-ecosystem/grpc-gateway/pull/1455) ([erikperttu](https://github.com/erikperttu)) +- Update google.golang.org/genproto commit hash to 44ba362 \(v2\) [\#1454](https://github.com/grpc-ecosystem/grpc-gateway/pull/1454) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to df9b449 \(v2\) [\#1452](https://github.com/grpc-ecosystem/grpc-gateway/pull/1452) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to a5b850b \(v2\) [\#1451](https://github.com/grpc-ecosystem/grpc-gateway/pull/1451) ([renovate[bot]](https://github.com/apps/renovate)) +- add mux.HandlePath method \(v2\) [\#1449](https://github.com/grpc-ecosystem/grpc-gateway/pull/1449) ([ti](https://github.com/ti)) +- Update google.golang.org/genproto commit hash to 7c474a2 \(v2\) [\#1447](https://github.com/grpc-ecosystem/grpc-gateway/pull/1447) ([renovate[bot]](https://github.com/apps/renovate)) +- fix rpc comment generation against allow\_merge \(v2\) [\#1446](https://github.com/grpc-ecosystem/grpc-gateway/pull/1446) ([kentdotn](https://github.com/kentdotn)) +- protoc-gen-grpc-gateway: fix bazel deps [\#1443](https://github.com/grpc-ecosystem/grpc-gateway/pull/1443) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- chore\(deps\): update google.golang.org/genproto commit hash to 12044bf \(v2\) [\#1442](https://github.com/grpc-ecosystem/grpc-gateway/pull/1442) ([renovate[bot]](https://github.com/apps/renovate)) +- protoc-gen-openapiv2: Fix message recursion detection \(v2\) [\#1439](https://github.com/grpc-ecosystem/grpc-gateway/pull/1439) ([doylezdead](https://github.com/doylezdead)) +- chore\(deps\): update google.golang.org/genproto commit hash to 0b04860 \(v2\) [\#1438](https://github.com/grpc-ecosystem/grpc-gateway/pull/1438) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to e855014 \(v2\) [\#1436](https://github.com/grpc-ecosystem/grpc-gateway/pull/1436) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update dependency com\_github\_bazelbuild\_buildtools to v3.2.0 \(v2\) [\#1435](https://github.com/grpc-ecosystem/grpc-gateway/pull/1435) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update dependency io\_bazel\_rules\_go to v0.23.3 \(v2\) [\#1433](https://github.com/grpc-ecosystem/grpc-gateway/pull/1433) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to 2bb8d61 \(v2\) [\#1432](https://github.com/grpc-ecosystem/grpc-gateway/pull/1432) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update golang docker tag to v1.14.4 \(v2\) [\#1431](https://github.com/grpc-ecosystem/grpc-gateway/pull/1431) ([renovate[bot]](https://github.com/apps/renovate)) +- Add openapi protobuf documentation examples [\#1429](https://github.com/grpc-ecosystem/grpc-gateway/pull/1429) ([bvwells](https://github.com/bvwells)) +- chore\(deps\): update google.golang.org/genproto commit hash to 0f60399 \(v2\) [\#1428](https://github.com/grpc-ecosystem/grpc-gateway/pull/1428) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update dependency io\_bazel\_rules\_go to v0.23.2 \(v2\) [\#1424](https://github.com/grpc-ecosystem/grpc-gateway/pull/1424) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update dependency bazel\_gazelle to v0.21.1 \(v2\) [\#1423](https://github.com/grpc-ecosystem/grpc-gateway/pull/1423) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to 705c0b3 \(v2\) [\#1422](https://github.com/grpc-ecosystem/grpc-gateway/pull/1422) ([renovate[bot]](https://github.com/apps/renovate)) +- cherry-pick \#1411 from master [\#1421](https://github.com/grpc-ecosystem/grpc-gateway/pull/1421) ([iamrajiv](https://github.com/iamrajiv)) +- Switch to new Go protobuf generators [\#1419](https://github.com/grpc-ecosystem/grpc-gateway/pull/1419) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- chore\(deps\): update google.golang.org/genproto commit hash to 3d3490e \(v2\) [\#1418](https://github.com/grpc-ecosystem/grpc-gateway/pull/1418) ([renovate[bot]](https://github.com/apps/renovate)) +- ci: enable glog [\#1417](https://github.com/grpc-ecosystem/grpc-gateway/pull/1417) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- chore\(deps\): update google.golang.org/genproto commit hash to 8367513 \(v2\) [\#1415](https://github.com/grpc-ecosystem/grpc-gateway/pull/1415) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update google.golang.org/genproto commit hash to 430c106 \(v2\) [\#1414](https://github.com/grpc-ecosystem/grpc-gateway/pull/1414) ([renovate[bot]](https://github.com/apps/renovate)) +- Replace golint with staticcheck [\#1412](https://github.com/grpc-ecosystem/grpc-gateway/pull/1412) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Automate more updates [\#1410](https://github.com/grpc-ecosystem/grpc-gateway/pull/1410) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Add module generator option [\#1409](https://github.com/grpc-ecosystem/grpc-gateway/pull/1409) ([Humpheh](https://github.com/Humpheh)) +- ci: be explicit about branch and user [\#1408](https://github.com/grpc-ecosystem/grpc-gateway/pull/1408) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- ci: automate regeneration of repositories.bzl [\#1407](https://github.com/grpc-ecosystem/grpc-gateway/pull/1407) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- chore\(deps\): update module google.golang.org/protobuf to v1.24.0 \(v2\) [\#1406](https://github.com/grpc-ecosystem/grpc-gateway/pull/1406) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 9bb8953 \(v2\) [\#1404](https://github.com/grpc-ecosystem/grpc-gateway/pull/1404) ([renovate[bot]](https://github.com/apps/renovate)) +- docs: use default marshaler in examples [\#1403](https://github.com/grpc-ecosystem/grpc-gateway/pull/1403) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- cherry-pick \#1399 from master [\#1401](https://github.com/grpc-ecosystem/grpc-gateway/pull/1401) ([joesonw](https://github.com/joesonw)) +- Adding docs about controlling http response status codes \(\#1391\) [\#1397](https://github.com/grpc-ecosystem/grpc-gateway/pull/1397) ([zhughes3](https://github.com/zhughes3)) + +## [v2.0.0-beta.3](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2.0.0-beta.3) (2020-05-25) +[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.0.0-beta.2...v2.0.0-beta.3) + +**Merged pull requests:** + +- Generate changelog for v2.0.0-beta.2 [\#1396](https://github.com/grpc-ecosystem/grpc-gateway/pull/1396) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- utilities: move package to public API [\#1395](https://github.com/grpc-ecosystem/grpc-gateway/pull/1395) ([johanbrandhorst](https://github.com/johanbrandhorst)) + +## [v2.0.0-beta.2](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2.0.0-beta.2) (2020-05-25) +[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.6...v2.0.0-beta.2) ## [v1.14.6](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.14.6) (2020-05-25) -[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.5...v1.14.6) +[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.0.0-beta.1...v1.14.6) + +## [v2.0.0-beta.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2.0.0-beta.1) (2020-05-25) +[Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.5...v2.0.0-beta.1) **Implemented enhancements:** @@ -149,44 +259,63 @@ **Merged pull requests:** -- Generate changelog for 1.14.6 [\#1394](https://github.com/grpc-ecosystem/grpc-gateway/pull/1394) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Tidy up docs [\#1389](https://github.com/grpc-ecosystem/grpc-gateway/pull/1389) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Fix various misspellings [\#1381](https://github.com/grpc-ecosystem/grpc-gateway/pull/1381) ([bvwells](https://github.com/bvwells)) -- Remove usage of deprecated grpc.Errorf API [\#1380](https://github.com/grpc-ecosystem/grpc-gateway/pull/1380) ([bvwells](https://github.com/bvwells)) -- Add missing documentation for openapiv2 proto definition [\#1375](https://github.com/grpc-ecosystem/grpc-gateway/pull/1375) ([bvwells](https://github.com/bvwells)) -- deleted ISSUE\_TEMPLATE.md file from \_docs which was left by mistake [\#1368](https://github.com/grpc-ecosystem/grpc-gateway/pull/1368) ([iamrajiv](https://github.com/iamrajiv)) -- added Pull Request Template for grpc-gateway [\#1366](https://github.com/grpc-ecosystem/grpc-gateway/pull/1366) ([iamrajiv](https://github.com/iamrajiv)) -- Improve comments, fix indentation and add new line [\#1362](https://github.com/grpc-ecosystem/grpc-gateway/pull/1362) ([amanjain97](https://github.com/amanjain97)) -- Improve README.md [\#1361](https://github.com/grpc-ecosystem/grpc-gateway/pull/1361) ([amanjain97](https://github.com/amanjain97)) -- Fix typo in CONTRIBUTING.md [\#1360](https://github.com/grpc-ecosystem/grpc-gateway/pull/1360) ([amanjain97](https://github.com/amanjain97)) -- improved customizingyourgateway.md [\#1359](https://github.com/grpc-ecosystem/grpc-gateway/pull/1359) ([iamrajiv](https://github.com/iamrajiv)) -- Update golang Docker tag to v1.14.3 \(master\) [\#1354](https://github.com/grpc-ecosystem/grpc-gateway/pull/1354) ([renovate[bot]](https://github.com/apps/renovate)) -- Globally ignore jekyll updates [\#1347](https://github.com/grpc-ecosystem/grpc-gateway/pull/1347) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Further renovate tweaks [\#1345](https://github.com/grpc-ecosystem/grpc-gateway/pull/1345) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Attempt to ignore golang/protobuf updates on master [\#1338](https://github.com/grpc-ecosystem/grpc-gateway/pull/1338) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- docs: add example customizing unmarshal options [\#1335](https://github.com/grpc-ecosystem/grpc-gateway/pull/1335) ([srenatus](https://github.com/srenatus)) -- Renovate: run go mod tidy after updates [\#1323](https://github.com/grpc-ecosystem/grpc-gateway/pull/1323) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Update google.golang.org/genproto commit hash to 09dca8e \(master\) [\#1321](https://github.com/grpc-ecosystem/grpc-gateway/pull/1321) ([renovate[bot]](https://github.com/apps/renovate)) -- fixed typo and grammar in docs/\_docs/usage.md [\#1318](https://github.com/grpc-ecosystem/grpc-gateway/pull/1318) ([iamrajiv](https://github.com/iamrajiv)) -- improved docs/\_docs/season\_of\_docs.md [\#1317](https://github.com/grpc-ecosystem/grpc-gateway/pull/1317) ([iamrajiv](https://github.com/iamrajiv)) -- Add bazel CI caching [\#1312](https://github.com/grpc-ecosystem/grpc-gateway/pull/1312) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Update module antihax/optional to v1 \(master\) [\#1296](https://github.com/grpc-ecosystem/grpc-gateway/pull/1296) ([renovate[bot]](https://github.com/apps/renovate)) -- Update dependency com\_github\_bazelbuild\_buildtools to v3 \(master\) [\#1295](https://github.com/grpc-ecosystem/grpc-gateway/pull/1295) ([renovate[bot]](https://github.com/apps/renovate)) -- Update module google.golang.org/grpc to v1.29.1 \(master\) [\#1294](https://github.com/grpc-ecosystem/grpc-gateway/pull/1294) ([renovate[bot]](https://github.com/apps/renovate)) -- Update golang Docker tag to v1.14.2 \(master\) [\#1292](https://github.com/grpc-ecosystem/grpc-gateway/pull/1292) ([renovate[bot]](https://github.com/apps/renovate)) -- Update dependency io\_bazel\_rules\_go to v0.22.4 \(master\) [\#1288](https://github.com/grpc-ecosystem/grpc-gateway/pull/1288) ([renovate[bot]](https://github.com/apps/renovate)) -- Update dependency com\_github\_bazelbuild\_buildtools to v0.29.0 \(master\) [\#1287](https://github.com/grpc-ecosystem/grpc-gateway/pull/1287) ([renovate[bot]](https://github.com/apps/renovate)) -- Update dependency bazel\_gazelle to v0.20.0 \(master\) [\#1286](https://github.com/grpc-ecosystem/grpc-gateway/pull/1286) ([renovate[bot]](https://github.com/apps/renovate)) -- Update google.golang.org/genproto commit hash to 43844f6 \(master\) [\#1285](https://github.com/grpc-ecosystem/grpc-gateway/pull/1285) ([renovate[bot]](https://github.com/apps/renovate)) -- Move renovate.json back to root [\#1284](https://github.com/grpc-ecosystem/grpc-gateway/pull/1284) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Configure Renovate to run on master and v2 [\#1281](https://github.com/grpc-ecosystem/grpc-gateway/pull/1281) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Update golang.org/x/oauth2 commit hash to bf48bf1 [\#1279](https://github.com/grpc-ecosystem/grpc-gateway/pull/1279) ([renovate[bot]](https://github.com/apps/renovate)) -- Add more instructions on the GitHub releases UI [\#1276](https://github.com/grpc-ecosystem/grpc-gateway/pull/1276) ([achew22](https://github.com/achew22)) -- Configure Renovate [\#1275](https://github.com/grpc-ecosystem/grpc-gateway/pull/1275) ([renovate[bot]](https://github.com/apps/renovate)) +- Generate changelog for v2.0.0-beta1 [\#1393](https://github.com/grpc-ecosystem/grpc-gateway/pull/1393) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Rename protoc-gen-swagger to protoc-gen-openapi [\#1390](https://github.com/grpc-ecosystem/grpc-gateway/pull/1390) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update docs for v2 [\#1388](https://github.com/grpc-ecosystem/grpc-gateway/pull/1388) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- runtime: remove DisallowUnknownFields\(\) [\#1386](https://github.com/grpc-ecosystem/grpc-gateway/pull/1386) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- runtime: make HTTPBodyMarshaler the default [\#1385](https://github.com/grpc-ecosystem/grpc-gateway/pull/1385) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Implement last-match-wins behaviour in mux [\#1384](https://github.com/grpc-ecosystem/grpc-gateway/pull/1384) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Fix various misspellings \(\#1381\) [\#1383](https://github.com/grpc-ecosystem/grpc-gateway/pull/1383) ([bvwells](https://github.com/bvwells)) +- Remove usage of deprecated grpc.Errorf API \(\#1380\) [\#1382](https://github.com/grpc-ecosystem/grpc-gateway/pull/1382) ([bvwells](https://github.com/bvwells)) +- Add missing documentation for openapiv2 proto definition \(\#1375\) [\#1378](https://github.com/grpc-ecosystem/grpc-gateway/pull/1378) ([bvwells](https://github.com/bvwells)) +- runtime: make default marshaler emit default values [\#1377](https://github.com/grpc-ecosystem/grpc-gateway/pull/1377) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Turn off UseProtoNames in default marshaler [\#1376](https://github.com/grpc-ecosystem/grpc-gateway/pull/1376) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- cherry-picked the commit from master to v2 in customizingyourgateway.md [\#1374](https://github.com/grpc-ecosystem/grpc-gateway/pull/1374) ([iamrajiv](https://github.com/iamrajiv)) +- Update google.golang.org/genproto commit hash to e9a78aa \(v2\) [\#1372](https://github.com/grpc-ecosystem/grpc-gateway/pull/1372) ([renovate[bot]](https://github.com/apps/renovate)) +- PR and Issue template added to v2 branch [\#1371](https://github.com/grpc-ecosystem/grpc-gateway/pull/1371) ([iamrajiv](https://github.com/iamrajiv)) +- Update google.golang.org/genproto commit hash to 08726f3 \(v2\) [\#1369](https://github.com/grpc-ecosystem/grpc-gateway/pull/1369) ([renovate[bot]](https://github.com/apps/renovate)) +- Improve README.md [\#1363](https://github.com/grpc-ecosystem/grpc-gateway/pull/1363) ([amanjain97](https://github.com/amanjain97)) +- all: replace all uses of golang/protobuf/proto [\#1358](https://github.com/grpc-ecosystem/grpc-gateway/pull/1358) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update module google/go-cmp to v0.4.1 \(v2\) [\#1357](https://github.com/grpc-ecosystem/grpc-gateway/pull/1357) ([renovate[bot]](https://github.com/apps/renovate)) +- chore\(deps\): update golang docker tag to v1.14.3 \(v2\) [\#1356](https://github.com/grpc-ecosystem/grpc-gateway/pull/1356) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency io\_bazel\_rules\_go to v0.23.1 \(v2\) [\#1355](https://github.com/grpc-ecosystem/grpc-gateway/pull/1355) ([renovate[bot]](https://github.com/apps/renovate)) +- remove unused PKGMAP [\#1353](https://github.com/grpc-ecosystem/grpc-gateway/pull/1353) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- internal/descriptor: move to generated apiconfig test [\#1352](https://github.com/grpc-ecosystem/grpc-gateway/pull/1352) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update google.golang.org/genproto commit hash to fc4c6c6 \(v2\) [\#1349](https://github.com/grpc-ecosystem/grpc-gateway/pull/1349) ([renovate[bot]](https://github.com/apps/renovate)) +- Renovate changes from master [\#1348](https://github.com/grpc-ecosystem/grpc-gateway/pull/1348) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- docs: add example customizing unmarshal options \(\#1335\) [\#1341](https://github.com/grpc-ecosystem/grpc-gateway/pull/1341) ([srenatus](https://github.com/srenatus)) +- chore\(deps\): update module golang/protobuf to v1.4.2 \(v2\) [\#1333](https://github.com/grpc-ecosystem/grpc-gateway/pull/1333) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 8feb7f2 \(v2\) [\#1331](https://github.com/grpc-ecosystem/grpc-gateway/pull/1331) ([renovate[bot]](https://github.com/apps/renovate)) +- all: correct use of go\_package [\#1329](https://github.com/grpc-ecosystem/grpc-gateway/pull/1329) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update dependency io\_bazel\_rules\_go to v0.23.0 \(v2\) [\#1328](https://github.com/grpc-ecosystem/grpc-gateway/pull/1328) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency bazel\_gazelle to v0.21.0 \(v2\) [\#1327](https://github.com/grpc-ecosystem/grpc-gateway/pull/1327) ([renovate[bot]](https://github.com/apps/renovate)) +- Renovate: run go mod tidy after updates [\#1324](https://github.com/grpc-ecosystem/grpc-gateway/pull/1324) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update google.golang.org/genproto commit hash to 09dca8e \(v2\) [\#1322](https://github.com/grpc-ecosystem/grpc-gateway/pull/1322) ([renovate[bot]](https://github.com/apps/renovate)) +- fixed typo in docs/\_docs/usage.md in v2 branch [\#1320](https://github.com/grpc-ecosystem/grpc-gateway/pull/1320) ([iamrajiv](https://github.com/iamrajiv)) +- improved docs/\_docs/season\_of\_docs.md in v2 branch [\#1319](https://github.com/grpc-ecosystem/grpc-gateway/pull/1319) ([iamrajiv](https://github.com/iamrajiv)) +- Add Bazel CI caching [\#1314](https://github.com/grpc-ecosystem/grpc-gateway/pull/1314) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update module antihax/optional to v1 \(v2\) [\#1311](https://github.com/grpc-ecosystem/grpc-gateway/pull/1311) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency com\_github\_bazelbuild\_buildtools to v3 \(v2\) [\#1310](https://github.com/grpc-ecosystem/grpc-gateway/pull/1310) ([renovate[bot]](https://github.com/apps/renovate)) +- runtime: rewrite fieldmask logic with protoreflect [\#1309](https://github.com/grpc-ecosystem/grpc-gateway/pull/1309) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Update module google.golang.org/grpc to v1.29.1 \(v2\) [\#1307](https://github.com/grpc-ecosystem/grpc-gateway/pull/1307) ([renovate[bot]](https://github.com/apps/renovate)) +- Update module golang/protobuf to v1.4.1 \(v2\) [\#1306](https://github.com/grpc-ecosystem/grpc-gateway/pull/1306) ([renovate[bot]](https://github.com/apps/renovate)) +- Update golang Docker tag to v1.14.2 \(v2\) [\#1305](https://github.com/grpc-ecosystem/grpc-gateway/pull/1305) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency io\_bazel\_rules\_go to v0.22.4 \(v2\) [\#1301](https://github.com/grpc-ecosystem/grpc-gateway/pull/1301) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency com\_github\_bazelbuild\_buildtools to v0.29.0 \(v2\) [\#1300](https://github.com/grpc-ecosystem/grpc-gateway/pull/1300) ([renovate[bot]](https://github.com/apps/renovate)) +- Update dependency bazel\_gazelle to v0.20.0 \(v2\) [\#1299](https://github.com/grpc-ecosystem/grpc-gateway/pull/1299) ([renovate[bot]](https://github.com/apps/renovate)) +- Update google.golang.org/genproto commit hash to 43844f6 \(v2\) [\#1298](https://github.com/grpc-ecosystem/grpc-gateway/pull/1298) ([renovate[bot]](https://github.com/apps/renovate)) +- Update golang.org/x/oauth2 commit hash to bf48bf1 \(v2\) [\#1297](https://github.com/grpc-ecosystem/grpc-gateway/pull/1297) ([renovate[bot]](https://github.com/apps/renovate)) +- Add more instructions on the GitHub releases UI [\#1277](https://github.com/grpc-ecosystem/grpc-gateway/pull/1277) ([achew22](https://github.com/achew22)) +- HttpBody mesage feature for stream RPC [\#1273](https://github.com/grpc-ecosystem/grpc-gateway/pull/1273) ([adasari](https://github.com/adasari)) +- Consolidate error handling configuration [\#1265](https://github.com/grpc-ecosystem/grpc-gateway/pull/1265) ([johanbrandhorst](https://github.com/johanbrandhorst)) ## [v1.14.5](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.14.5) (2020-05-07) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.0.0-alpha.2...v1.14.5) +**Implemented enhancements:** + +- Standalone gateway package [\#1239](https://github.com/grpc-ecosystem/grpc-gateway/pull/1239) ([ssetin](https://github.com/ssetin)) + **Fixed bugs:** - Regeneration commands don't regenerate all files [\#1229](https://github.com/grpc-ecosystem/grpc-gateway/issues/1229) @@ -210,21 +339,25 @@ **Merged pull requests:** -- Generate release notes for 1.14.5 [\#1270](https://github.com/grpc-ecosystem/grpc-gateway/pull/1270) ([achew22](https://github.com/achew22)) -- protoc-gen-swagger, Fix for infinite loop on circular references in query parameters [\#1266](https://github.com/grpc-ecosystem/grpc-gateway/pull/1266) ([Romeren](https://github.com/Romeren)) -- Remove uses of protoc-gen-go/generator [\#1260](https://github.com/grpc-ecosystem/grpc-gateway/pull/1260) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Use public key to authenticate for docker registry [\#1259](https://github.com/grpc-ecosystem/grpc-gateway/pull/1259) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Add Chef and Scaleway to ADOPTERS.md [\#1255](https://github.com/grpc-ecosystem/grpc-gateway/pull/1255) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Add user testimonials and ADOPTERS.md [\#1250](https://github.com/grpc-ecosystem/grpc-gateway/pull/1250) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Remove duplicate regeneration documentation [\#1248](https://github.com/grpc-ecosystem/grpc-gateway/pull/1248) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Change build env to git repo package [\#1246](https://github.com/grpc-ecosystem/grpc-gateway/pull/1246) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Move section about google protobufs [\#1241](https://github.com/grpc-ecosystem/grpc-gateway/pull/1241) ([thecodejunkie](https://github.com/thecodejunkie)) -- Fix generating helloworld.proto [\#1230](https://github.com/grpc-ecosystem/grpc-gateway/pull/1230) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Fix testproto generation, add to CI [\#1221](https://github.com/grpc-ecosystem/grpc-gateway/pull/1221) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- docs: fix some broken links and change godoc.org links to pkg.go.dev [\#1219](https://github.com/grpc-ecosystem/grpc-gateway/pull/1219) ([AyushG3112](https://github.com/AyushG3112)) -- Add season of docs project ideas page [\#1214](https://github.com/grpc-ecosystem/grpc-gateway/pull/1214) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- remove deprecated usage of github.com/golang/protobuf/protoc-gen-go/generator [\#1213](https://github.com/grpc-ecosystem/grpc-gateway/pull/1213) ([yinzara](https://github.com/yinzara)) -- fix query params for invoked in-process local request [\#1212](https://github.com/grpc-ecosystem/grpc-gateway/pull/1212) ([hb-chen](https://github.com/hb-chen)) +- runtime: rewrite query.go in new protoreflect [\#1272](https://github.com/grpc-ecosystem/grpc-gateway/pull/1272) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- V2 [\#1267](https://github.com/grpc-ecosystem/grpc-gateway/pull/1267) ([Romeren](https://github.com/Romeren)) +- runtime: replace StreamError with status.Status [\#1262](https://github.com/grpc-ecosystem/grpc-gateway/pull/1262) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Remove uses of protoc-gen-go/generator [\#1261](https://github.com/grpc-ecosystem/grpc-gateway/pull/1261) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Add Chef and Scaleway to ADOPTERS.md [\#1257](https://github.com/grpc-ecosystem/grpc-gateway/pull/1257) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Use public key to authenticate for docker registry [\#1253](https://github.com/grpc-ecosystem/grpc-gateway/pull/1253) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Add user testimonials and ADOPTERS.md [\#1251](https://github.com/grpc-ecosystem/grpc-gateway/pull/1251) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Minimize public API [\#1249](https://github.com/grpc-ecosystem/grpc-gateway/pull/1249) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Change build env to git repo v2 [\#1247](https://github.com/grpc-ecosystem/grpc-gateway/pull/1247) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- \#1098: remove error field from error messages [\#1242](https://github.com/grpc-ecosystem/grpc-gateway/pull/1242) ([srenatus](https://github.com/srenatus)) +- v2: remove deprecated usage of github.com/golang/protobuf/protoc-gen-go/g… [\#1238](https://github.com/grpc-ecosystem/grpc-gateway/pull/1238) ([yinzara](https://github.com/yinzara)) +- remove deprecated usage of github.com/golang/protobuf/protoc-gen-go/g… [\#1237](https://github.com/grpc-ecosystem/grpc-gateway/pull/1237) ([yinzara](https://github.com/yinzara)) +- v2: set rpcMethodName in request.Context [\#1234](https://github.com/grpc-ecosystem/grpc-gateway/pull/1234) ([AyushG3112](https://github.com/AyushG3112)) +- Fix generating helloworld.proto [\#1231](https://github.com/grpc-ecosystem/grpc-gateway/pull/1231) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- v2 fix query params for invoked in-process local request [\#1227](https://github.com/grpc-ecosystem/grpc-gateway/pull/1227) ([hb-chen](https://github.com/hb-chen)) +- docs: fix some broken links and change godoc.org links to pkg.go.dev [\#1222](https://github.com/grpc-ecosystem/grpc-gateway/pull/1222) ([AyushG3112](https://github.com/AyushG3112)) +- docs: change godoc.org links to pkg.go.dev [\#1220](https://github.com/grpc-ecosystem/grpc-gateway/pull/1220) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- v2: Fix gorelease base, update README [\#1218](https://github.com/grpc-ecosystem/grpc-gateway/pull/1218) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Upgrade protobuf to 1.4.0 [\#1165](https://github.com/grpc-ecosystem/grpc-gateway/pull/1165) ([johanbrandhorst](https://github.com/johanbrandhorst)) ## [v2.0.0-alpha.2](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2.0.0-alpha.2) (2020-04-18) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.0.0-alpha.1...v2.0.0-alpha.2) @@ -248,12 +381,7 @@ **Merged pull requests:** -- Generate changelog for 1.14.4 [\#1217](https://github.com/grpc-ecosystem/grpc-gateway/pull/1217) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Add option to disable new operationID generation [\#1216](https://github.com/grpc-ecosystem/grpc-gateway/pull/1216) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Misc docs changes [\#1215](https://github.com/grpc-ecosystem/grpc-gateway/pull/1215) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- http rule's response\_body support to stream rpc [\#1208](https://github.com/grpc-ecosystem/grpc-gateway/pull/1208) ([adasari](https://github.com/adasari)) -- Add GopherCon UK link to README [\#1204](https://github.com/grpc-ecosystem/grpc-gateway/pull/1204) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Move codegenerator back to public namespace [\#1200](https://github.com/grpc-ecosystem/grpc-gateway/pull/1200) ([johanbrandhorst](https://github.com/johanbrandhorst)) +- Add Season of Docs project ideas page [\#1224](https://github.com/grpc-ecosystem/grpc-gateway/pull/1224) ([johanbrandhorst](https://github.com/johanbrandhorst)) ## [v1.14.4-rc.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.14.4-rc.1) (2020-04-01) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.3...v1.14.4-rc.1) @@ -272,18 +400,6 @@ - Swagger definition is broken if there's no default error response set [\#1162](https://github.com/grpc-ecosystem/grpc-gateway/issues/1162) - Using golang/protobuf v1.4.0-rc.3 locks up generators [\#1158](https://github.com/grpc-ecosystem/grpc-gateway/issues/1158) -**Merged pull requests:** - -- Generate changelog for 1.14.4-rc.1 [\#1194](https://github.com/grpc-ecosystem/grpc-gateway/pull/1194) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Generate Swagger with Unique Operation IDs [\#1193](https://github.com/grpc-ecosystem/grpc-gateway/pull/1193) ([dadgar](https://github.com/dadgar)) -- Xin/support deep levels reserved json name [\#1191](https://github.com/grpc-ecosystem/grpc-gateway/pull/1191) ([xin-au](https://github.com/xin-au)) -- feat: add enumAsInts flag [\#1186](https://github.com/grpc-ecosystem/grpc-gateway/pull/1186) ([rowe0x](https://github.com/rowe0x)) -- Use 8088 instead of 8080 in integration test. [\#1184](https://github.com/grpc-ecosystem/grpc-gateway/pull/1184) ([drigz](https://github.com/drigz)) -- Limit Bazel memory usage in CI. [\#1183](https://github.com/grpc-ecosystem/grpc-gateway/pull/1183) ([drigz](https://github.com/drigz)) -- fix version spelling [\#1181](https://github.com/grpc-ecosystem/grpc-gateway/pull/1181) ([seriousben](https://github.com/seriousben)) -- Emit error on HTTP rules without a matching selector and log warning on unbound methods [\#1178](https://github.com/grpc-ecosystem/grpc-gateway/pull/1178) ([andrascz](https://github.com/andrascz)) -- genswagger: don't emit default response if there's no Error definition [\#1166](https://github.com/grpc-ecosystem/grpc-gateway/pull/1166) ([utrack](https://github.com/utrack)) - ## [v1.14.3](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.14.3) (2020-03-11) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.2...v1.14.3) @@ -291,11 +407,6 @@ - Missing httprule breaks our module [\#1168](https://github.com/grpc-ecosystem/grpc-gateway/issues/1168) -**Merged pull requests:** - -- Generate changelog for 1.14.3 [\#1170](https://github.com/grpc-ecosystem/grpc-gateway/pull/1170) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Move httprule back into the public API [\#1169](https://github.com/grpc-ecosystem/grpc-gateway/pull/1169) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.14.2](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.14.2) (2020-03-09) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.1...v1.14.2) @@ -306,21 +417,9 @@ - Path parameters visible in the body of the request [\#1157](https://github.com/grpc-ecosystem/grpc-gateway/issues/1157) - 1.14.0 breaks existing pipelines [\#1154](https://github.com/grpc-ecosystem/grpc-gateway/issues/1154) -**Merged pull requests:** - -- Generate changelog for 1.14.2 [\#1164](https://github.com/grpc-ecosystem/grpc-gateway/pull/1164) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Move genswagger to public API again [\#1163](https://github.com/grpc-ecosystem/grpc-gateway/pull/1163) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.14.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.14.1) (2020-03-05) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.14.0...v1.14.1) -**Merged pull requests:** - -- Generate changelog for 1.14.1 [\#1156](https://github.com/grpc-ecosystem/grpc-gateway/pull/1156) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Move generator and descriptor back to public API [\#1155](https://github.com/grpc-ecosystem/grpc-gateway/pull/1155) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Update build environment to 1.14 [\#1153](https://github.com/grpc-ecosystem/grpc-gateway/pull/1153) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Add gorelease CI step [\#1152](https://github.com/grpc-ecosystem/grpc-gateway/pull/1152) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.14.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.14.0) (2020-03-04) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.13.0...v1.14.0) @@ -332,27 +431,12 @@ - Is grpc-gateway a stateless application? [\#1139](https://github.com/grpc-ecosystem/grpc-gateway/issues/1139) - Support for custom query parameters parsers [\#1128](https://github.com/grpc-ecosystem/grpc-gateway/issues/1128) -**Merged pull requests:** - -- Generate changelog for 1.14.0 [\#1151](https://github.com/grpc-ecosystem/grpc-gateway/pull/1151) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Use an interface for ContentTypeFromMessage [\#1150](https://github.com/grpc-ecosystem/grpc-gateway/pull/1150) ([wtlangford](https://github.com/wtlangford)) -- Minimize API surface in anticipation of gorelease [\#1146](https://github.com/grpc-ecosystem/grpc-gateway/pull/1146) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Fix \#1143: Support multiple error handlers. [\#1144](https://github.com/grpc-ecosystem/grpc-gateway/pull/1144) ([jgiles](https://github.com/jgiles)) -- Fix customizing your gateway documentation CustomMatcher example [\#1142](https://github.com/grpc-ecosystem/grpc-gateway/pull/1142) ([wiliamsouza](https://github.com/wiliamsouza)) -- protoc-gen-swagger: add flag to disable default errors [\#1141](https://github.com/grpc-ecosystem/grpc-gateway/pull/1141) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Bump nokogiri from 1.10.4 to 1.10.8 in /docs [\#1140](https://github.com/grpc-ecosystem/grpc-gateway/pull/1140) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Configurable query parameters parser [\#1138](https://github.com/grpc-ecosystem/grpc-gateway/pull/1138) ([wp0pw](https://github.com/wp0pw)) -- Improve installation instructions [\#1132](https://github.com/grpc-ecosystem/grpc-gateway/pull/1132) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Add bazel gazelle to CONTRIBUTING [\#1131](https://github.com/grpc-ecosystem/grpc-gateway/pull/1131) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Configure response content type at the method level [\#1130](https://github.com/grpc-ecosystem/grpc-gateway/pull/1130) ([nboukeffa](https://github.com/nboukeffa)) - ## [v1.13.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.13.0) (2020-02-11) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.12.2...v1.13.0) **Implemented enhancements:** - \[Feature Request\] Custom Type conversion [\#754](https://github.com/grpc-ecosystem/grpc-gateway/issues/754) -- protoc-gen-swagger: add default error response [\#1127](https://github.com/grpc-ecosystem/grpc-gateway/pull/1127) ([johanbrandhorst](https://github.com/johanbrandhorst)) **Closed issues:** @@ -361,12 +445,6 @@ - protoc-gen-swagger: Support for repeated custom message in url params [\#1119](https://github.com/grpc-ecosystem/grpc-gateway/issues/1119) - protoc-gen-swagger: Support Response-specific examples [\#1117](https://github.com/grpc-ecosystem/grpc-gateway/issues/1117) -**Merged pull requests:** - -- Generate changelog for 1.13.0 [\#1129](https://github.com/grpc-ecosystem/grpc-gateway/pull/1129) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Fix \#1125: JSON-prefix nested-field params. [\#1126](https://github.com/grpc-ecosystem/grpc-gateway/pull/1126) ([jgiles](https://github.com/jgiles)) -- Fix \#1117: Support response examples. [\#1124](https://github.com/grpc-ecosystem/grpc-gateway/pull/1124) ([jgiles](https://github.com/jgiles)) - ## [v1.12.2](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.12.2) (2020-01-22) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.12.1...v1.12.2) @@ -393,19 +471,6 @@ - extract protoc-gen-swagger to separate repo [\#1083](https://github.com/grpc-ecosystem/grpc-gateway/issues/1083) - How do I load balance call grpc service? [\#1081](https://github.com/grpc-ecosystem/grpc-gateway/issues/1081) -**Merged pull requests:** - -- Generate changelog for 1.12.2 [\#1120](https://github.com/grpc-ecosystem/grpc-gateway/pull/1120) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- docs: require Jekyll Github Token to be set [\#1118](https://github.com/grpc-ecosystem/grpc-gateway/pull/1118) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- fix: protoc-gen-swagger: get wrong second services method comments [\#1116](https://github.com/grpc-ecosystem/grpc-gateway/pull/1116) ([chinaran](https://github.com/chinaran)) -- Bump rubyzip from 1.2.3 to 2.0.0 in /docs [\#1115](https://github.com/grpc-ecosystem/grpc-gateway/pull/1115) ([dependabot[bot]](https://github.com/apps/dependabot)) -- \#1113 Fix broken parsing of camelCase oneof [\#1114](https://github.com/grpc-ecosystem/grpc-gateway/pull/1114) ([seanlaff](https://github.com/seanlaff)) -- \#1109 Inline streamingDefinitions in generated swagger to better support codegen tools [\#1112](https://github.com/grpc-ecosystem/grpc-gateway/pull/1112) ([seanlaff](https://github.com/seanlaff)) -- Explicitly load rules\_proto rules [\#1102](https://github.com/grpc-ecosystem/grpc-gateway/pull/1102) ([achew22](https://github.com/achew22)) -- \[bazel\] Correctly handle proto files under \_virtual\_imports [\#1095](https://github.com/grpc-ecosystem/grpc-gateway/pull/1095) ([Yannic](https://github.com/Yannic)) -- Override operation\_id when available [\#1091](https://github.com/grpc-ecosystem/grpc-gateway/pull/1091) ([guilherme-santos](https://github.com/guilherme-santos)) -- Support reserved json name and add tests [\#1085](https://github.com/grpc-ecosystem/grpc-gateway/pull/1085) ([xin-au](https://github.com/xin-au)) - ## [v1.12.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.12.1) (2019-11-06) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.12.0...v1.12.1) @@ -413,12 +478,6 @@ - Unable to create HTTP mapping with "/parent" [\#1079](https://github.com/grpc-ecosystem/grpc-gateway/issues/1079) -**Merged pull requests:** - -- Generate changelog for 1.12.1 [\#1080](https://github.com/grpc-ecosystem/grpc-gateway/pull/1080) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Revert "Fix templateToSwaggerPath generates invalid path" [\#1078](https://github.com/grpc-ecosystem/grpc-gateway/pull/1078) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Support json\_names\_for\_fields in starlark rule protoc\_gen\_swagger [\#1077](https://github.com/grpc-ecosystem/grpc-gateway/pull/1077) ([prestonvanloon](https://github.com/prestonvanloon)) - ## [v1.12.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.12.0) (2019-11-04) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.11.3...v1.12.0) @@ -441,21 +500,6 @@ - protoc-gen-swagger/genswagger does not build on go1.11 and earlier versions [\#1061](https://github.com/grpc-ecosystem/grpc-gateway/issues/1061) - How to support custom output, implementation [\#1055](https://github.com/grpc-ecosystem/grpc-gateway/issues/1055) -**Merged pull requests:** - -- Generate changelog for 1.12.0 [\#1076](https://github.com/grpc-ecosystem/grpc-gateway/pull/1076) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Support creating a Swagger def with no schemes [\#1075](https://github.com/grpc-ecosystem/grpc-gateway/pull/1075) ([ailurarctos](https://github.com/ailurarctos)) -- Update dockerfile and regenerate files [\#1074](https://github.com/grpc-ecosystem/grpc-gateway/pull/1074) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- annotations: Sort import order. [\#1072](https://github.com/grpc-ecosystem/grpc-gateway/pull/1072) ([someone1](https://github.com/someone1)) -- fix\(protoc-gen-swagger\): Windows compatibility [\#1070](https://github.com/grpc-ecosystem/grpc-gateway/pull/1070) ([mrmeku](https://github.com/mrmeku)) -- adding build-scoping for builds on earlier go versions \(\<1.12\) [\#1062](https://github.com/grpc-ecosystem/grpc-gateway/pull/1062) ([marcusljx](https://github.com/marcusljx)) -- Add back bzip2 to image [\#1060](https://github.com/grpc-ecosystem/grpc-gateway/pull/1060) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Swagger 2.4.8 [\#1058](https://github.com/grpc-ecosystem/grpc-gateway/pull/1058) ([zachgersh](https://github.com/zachgersh)) -- get bazel deps back in right spot [\#1057](https://github.com/grpc-ecosystem/grpc-gateway/pull/1057) ([zachgersh](https://github.com/zachgersh)) -- use Go templates in protofile comments [\#1056](https://github.com/grpc-ecosystem/grpc-gateway/pull/1056) ([Jeremytjuh](https://github.com/Jeremytjuh)) -- Bump generators Dockerfile to 1.13.1 [\#1054](https://github.com/grpc-ecosystem/grpc-gateway/pull/1054) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Updates grpc proto deps [\#1053](https://github.com/grpc-ecosystem/grpc-gateway/pull/1053) ([zachgersh](https://github.com/zachgersh)) - ## [v1.11.3](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.11.3) (2019-09-30) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.11.2...v1.11.3) @@ -465,13 +509,6 @@ - Question: Override TransientFailure error with friendlier response [\#1047](https://github.com/grpc-ecosystem/grpc-gateway/issues/1047) - Wrong codes generated when nested enum in path [\#1017](https://github.com/grpc-ecosystem/grpc-gateway/issues/1017) -**Merged pull requests:** - -- Generate changelog for 1.11.3 [\#1052](https://github.com/grpc-ecosystem/grpc-gateway/pull/1052) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Support json names in field mask generation [\#1050](https://github.com/grpc-ecosystem/grpc-gateway/pull/1050) ([william-plano-oxb](https://github.com/william-plano-oxb)) -- Fix auto generated fieldmask case in patch requests [\#1049](https://github.com/grpc-ecosystem/grpc-gateway/pull/1049) ([william-plano-oxb](https://github.com/william-plano-oxb)) -- Pass nested enum values through properly when used as url parameters [\#1048](https://github.com/grpc-ecosystem/grpc-gateway/pull/1048) ([mnito](https://github.com/mnito)) - ## [v1.11.2](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.11.2) (2019-09-20) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.11.1...v1.11.2) @@ -491,22 +528,6 @@ - Is there any way to let json int32 can not accept string in grpc-gateway? [\#1029](https://github.com/grpc-ecosystem/grpc-gateway/issues/1029) - Go integration tests are somewhat flaky [\#992](https://github.com/grpc-ecosystem/grpc-gateway/issues/992) -**Merged pull requests:** - -- Generate changelog for 1.11.2 [\#1045](https://github.com/grpc-ecosystem/grpc-gateway/pull/1045) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Remove "make test" recommendation from CONTRIBUTING.md [\#1040](https://github.com/grpc-ecosystem/grpc-gateway/pull/1040) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- examples/integration: wait for secondary gateway [\#1039](https://github.com/grpc-ecosystem/grpc-gateway/pull/1039) ([srenatus](https://github.com/srenatus)) -- Update README.md [\#1038](https://github.com/grpc-ecosystem/grpc-gateway/pull/1038) ([piengeng](https://github.com/piengeng)) -- Configure stale\[bot\] [\#1036](https://github.com/grpc-ecosystem/grpc-gateway/pull/1036) ([achew22](https://github.com/achew22)) -- added additional info for custom http headers [\#1035](https://github.com/grpc-ecosystem/grpc-gateway/pull/1035) ([cemenson](https://github.com/cemenson)) -- protoc-gen-swagger: add support for arbitrary extensions [\#1033](https://github.com/grpc-ecosystem/grpc-gateway/pull/1033) ([srenatus](https://github.com/srenatus)) -- nitpick spacing in other proto files [\#1032](https://github.com/grpc-ecosystem/grpc-gateway/pull/1032) ([srenatus](https://github.com/srenatus)) -- nitpick a\_bit\_of\_everything.proto [\#1030](https://github.com/grpc-ecosystem/grpc-gateway/pull/1030) ([srenatus](https://github.com/srenatus)) -- runtime: stop using nil ponters with Unmarshal [\#1028](https://github.com/grpc-ecosystem/grpc-gateway/pull/1028) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Small performance fix [\#1027](https://github.com/grpc-ecosystem/grpc-gateway/pull/1027) ([dshemin](https://github.com/dshemin)) -- docs need type assertion on proto.Message [\#1026](https://github.com/grpc-ecosystem/grpc-gateway/pull/1026) ([zachgersh](https://github.com/zachgersh)) -- Update ISSUE\_TEMPLATE.md [\#1014](https://github.com/grpc-ecosystem/grpc-gateway/pull/1014) ([prologic](https://github.com/prologic)) - ## [v1.11.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.11.1) (2019-09-02) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.11.0...v1.11.1) @@ -520,12 +541,6 @@ - Fuzzit CI job is failing unexpectedly [\#1019](https://github.com/grpc-ecosystem/grpc-gateway/issues/1019) - Bazel Rule? [\#1010](https://github.com/grpc-ecosystem/grpc-gateway/issues/1010) -**Merged pull requests:** - -- Generate changelog for 1.11.1 [\#1024](https://github.com/grpc-ecosystem/grpc-gateway/pull/1024) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Fuzzit: use go-fuzz with go-modules support [\#1022](https://github.com/grpc-ecosystem/grpc-gateway/pull/1022) ([yevgenypats](https://github.com/yevgenypats)) -- invoke in process server need attach md to incoming context [\#1021](https://github.com/grpc-ecosystem/grpc-gateway/pull/1021) ([hb-chen](https://github.com/hb-chen)) - ## [v1.11.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.11.0) (2019-08-30) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.10.0...v1.11.0) @@ -537,22 +552,12 @@ - protoc-gen-swagger does not generate parameters other than body and path parameters. [\#1012](https://github.com/grpc-ecosystem/grpc-gateway/issues/1012) -**Merged pull requests:** - -- Generate changelog for 1.11.0 [\#1020](https://github.com/grpc-ecosystem/grpc-gateway/pull/1020) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- remove template func RegisterXXXServer\(\) unused param opts \[\]grpc.DialOption [\#1018](https://github.com/grpc-ecosystem/grpc-gateway/pull/1018) ([hb-chen](https://github.com/hb-chen)) -- Fix hand-crafted protobuf message [\#1016](https://github.com/grpc-ecosystem/grpc-gateway/pull/1016) ([dsnet](https://github.com/dsnet)) -- Bump ffi from 1.9.23 to 1.11.1 in /docs [\#1009](https://github.com/grpc-ecosystem/grpc-gateway/pull/1009) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump rubyzip from 1.2.1 to 1.2.3 in /docs [\#1008](https://github.com/grpc-ecosystem/grpc-gateway/pull/1008) ([dependabot[bot]](https://github.com/apps/dependabot)) -- Bump nokogiri from 1.8.2 to 1.10.4 in /docs [\#1007](https://github.com/grpc-ecosystem/grpc-gateway/pull/1007) ([dependabot[bot]](https://github.com/apps/dependabot)) - ## [v1.10.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.10.0) (2019-08-28) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.9.6...v1.10.0) **Implemented enhancements:** - allow protobuf well known types in params [\#400](https://github.com/grpc-ecosystem/grpc-gateway/issues/400) -- Add a register, so that the gRPC service can be invoked in-process to provide a HTTP server. [\#947](https://github.com/grpc-ecosystem/grpc-gateway/pull/947) ([hb-chen](https://github.com/hb-chen)) **Fixed bugs:** @@ -565,13 +570,6 @@ - Suggestion: Continuous Fuzzing [\#998](https://github.com/grpc-ecosystem/grpc-gateway/issues/998) - Why grpc gateway does not call grpc callback directly? [\#952](https://github.com/grpc-ecosystem/grpc-gateway/issues/952) -**Merged pull requests:** - -- Generate changelog for 1.10.0 [\#1011](https://github.com/grpc-ecosystem/grpc-gateway/pull/1011) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Fix templateToSwaggerPath generates invalid path [\#1006](https://github.com/grpc-ecosystem/grpc-gateway/pull/1006) ([ch3rub1m](https://github.com/ch3rub1m)) -- Allow overriding the primitive type of fields [\#1003](https://github.com/grpc-ecosystem/grpc-gateway/pull/1003) ([snowzach](https://github.com/snowzach)) -- Add Continuous Fuzzing Integration via fuzzit.dev [\#1001](https://github.com/grpc-ecosystem/grpc-gateway/pull/1001) ([yevgenypats](https://github.com/yevgenypats)) - ## [v1.9.6](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.9.6) (2019-08-16) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.9.5...v1.9.6) @@ -586,19 +584,6 @@ - I want to know how to transfer http+proto to grpc. [\#977](https://github.com/grpc-ecosystem/grpc-gateway/issues/977) - Is it possible to use protoc-gen-swagger options in my own protos? [\#976](https://github.com/grpc-ecosystem/grpc-gateway/issues/976) -**Merged pull requests:** - -- Disable Windows CI Bazel [\#996](https://github.com/grpc-ecosystem/grpc-gateway/pull/996) ([achew22](https://github.com/achew22)) -- Correct HTTPBody doc [\#995](https://github.com/grpc-ecosystem/grpc-gateway/pull/995) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Generate changelog for 1.9.6 [\#993](https://github.com/grpc-ecosystem/grpc-gateway/pull/993) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- protoc-gen-swagger: correctly type struct.proto types [\#990](https://github.com/grpc-ecosystem/grpc-gateway/pull/990) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Camel case backward compatible in Swagger doc [\#988](https://github.com/grpc-ecosystem/grpc-gateway/pull/988) ([xin-au](https://github.com/xin-au)) -- Add doc for opentracing support [\#987](https://github.com/grpc-ecosystem/grpc-gateway/pull/987) ([vthiery](https://github.com/vthiery)) -- Use json camel case when GetUseJSONNamesForFields is enabled [\#985](https://github.com/grpc-ecosystem/grpc-gateway/pull/985) ([xin-au](https://github.com/xin-au)) -- Create presubmit.yaml which configures CI [\#983](https://github.com/grpc-ecosystem/grpc-gateway/pull/983) ([achew22](https://github.com/achew22)) -- Fix release script [\#982](https://github.com/grpc-ecosystem/grpc-gateway/pull/982) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Upgrade to the latest rules\_go [\#979](https://github.com/grpc-ecosystem/grpc-gateway/pull/979) ([achew22](https://github.com/achew22)) - ## [v1.9.5](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.9.5) (2019-07-22) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.9.4...v1.9.5) @@ -610,12 +595,6 @@ - why response use enum's name [\#970](https://github.com/grpc-ecosystem/grpc-gateway/issues/970) -**Merged pull requests:** - -- Generate changelog for 1.9.5 [\#975](https://github.com/grpc-ecosystem/grpc-gateway/pull/975) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Fix HTTP Status Code returned for a `Failed Precondition` error [\#974](https://github.com/grpc-ecosystem/grpc-gateway/pull/974) ([cjcormack](https://github.com/cjcormack)) -- Examples fix: Support preflight of auth libraries in js [\#973](https://github.com/grpc-ecosystem/grpc-gateway/pull/973) ([GhiaC](https://github.com/GhiaC)) - ## [v1.9.4](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.9.4) (2019-07-09) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.9.3...v1.9.4) @@ -624,13 +603,6 @@ - Read the Http Post Body [\#921](https://github.com/grpc-ecosystem/grpc-gateway/issues/921) - Swagger document generation, required field is invalid [\#665](https://github.com/grpc-ecosystem/grpc-gateway/issues/665) -**Merged pull requests:** - -- Generate changelog for 1.9.4 [\#969](https://github.com/grpc-ecosystem/grpc-gateway/pull/969) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Fix query.go to avoid invalid protobuf assumptions [\#967](https://github.com/grpc-ecosystem/grpc-gateway/pull/967) ([dsnet](https://github.com/dsnet)) -- doc\(readme\): fix typo [\#965](https://github.com/grpc-ecosystem/grpc-gateway/pull/965) ([franxois](https://github.com/franxois)) -- Added comments to base\_path to explain behavior [\#919](https://github.com/grpc-ecosystem/grpc-gateway/pull/919) ([nu11ptr](https://github.com/nu11ptr)) - ## [v1.9.3](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.9.3) (2019-06-28) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.9.2...v1.9.3) @@ -645,15 +617,6 @@ - Bazel files are out of date [\#955](https://github.com/grpc-ecosystem/grpc-gateway/issues/955) - Configurable AllowUnknownFields in jsonpb? [\#448](https://github.com/grpc-ecosystem/grpc-gateway/issues/448) -**Merged pull requests:** - -- Generate changelog for 1.9.3 [\#964](https://github.com/grpc-ecosystem/grpc-gateway/pull/964) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- EOF on send [\#962](https://github.com/grpc-ecosystem/grpc-gateway/pull/962) ([gustavocovas](https://github.com/gustavocovas)) -- Add new option for the decoder - to disallow unknown fields [\#959](https://github.com/grpc-ecosystem/grpc-gateway/pull/959) ([vsaveliev](https://github.com/vsaveliev)) -- Update to rules\_go and buildtools [\#956](https://github.com/grpc-ecosystem/grpc-gateway/pull/956) ([drigz](https://github.com/drigz)) -- docs/customizingyourgateway: add ?pretty example [\#954](https://github.com/grpc-ecosystem/grpc-gateway/pull/954) ([srenatus](https://github.com/srenatus)) -- protoc\_gen\_swagger: Add attr for allow\_merge [\#944](https://github.com/grpc-ecosystem/grpc-gateway/pull/944) ([prestonvanloon](https://github.com/prestonvanloon)) - ## [v1.9.2](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.9.2) (2019-06-17) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.9.1...v1.9.2) @@ -661,12 +624,6 @@ - 404s using colons in the middle of the last path segment [\#224](https://github.com/grpc-ecosystem/grpc-gateway/issues/224) -**Merged pull requests:** - -- Generate changelog for 1.9.2 [\#953](https://github.com/grpc-ecosystem/grpc-gateway/pull/953) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Improve README file [\#950](https://github.com/grpc-ecosystem/grpc-gateway/pull/950) ([charleswhchan](https://github.com/charleswhchan)) -- Support colon in final path segment, last match wins behavior \(behind flags\) [\#949](https://github.com/grpc-ecosystem/grpc-gateway/pull/949) ([jfhamlin](https://github.com/jfhamlin)) - ## [v1.9.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.9.1) (2019-06-13) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.9.0...v1.9.1) @@ -678,13 +635,6 @@ - all SubConns are in TransientFailure [\#936](https://github.com/grpc-ecosystem/grpc-gateway/issues/936) - Merging swagger specs fails to use rpc comments \(again\) [\#923](https://github.com/grpc-ecosystem/grpc-gateway/issues/923) -**Merged pull requests:** - -- Generate changelog for 1.9.1 [\#946](https://github.com/grpc-ecosystem/grpc-gateway/pull/946) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Revert "protoc-gen-swagger: check typeIndex when typeName is Method" [\#945](https://github.com/grpc-ecosystem/grpc-gateway/pull/945) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- fix query params not populate if method is post [\#939](https://github.com/grpc-ecosystem/grpc-gateway/pull/939) ([mingqing](https://github.com/mingqing)) -- Fix make test on MacOS [\#935](https://github.com/grpc-ecosystem/grpc-gateway/pull/935) ([emilaasa](https://github.com/emilaasa)) - ## [v1.9.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.9.0) (2019-05-14) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.8.6...v1.9.0) @@ -692,13 +642,6 @@ - Errors in response streams do not go through the registered error handler [\#584](https://github.com/grpc-ecosystem/grpc-gateway/issues/584) -**Merged pull requests:** - -- Generate changelog for 1.9.0 [\#933](https://github.com/grpc-ecosystem/grpc-gateway/pull/933) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- use error value for bad URI so custom error handler could treat it special [\#932](https://github.com/grpc-ecosystem/grpc-gateway/pull/932) ([jhump](https://github.com/jhump)) -- newline between JSON messages [\#931](https://github.com/grpc-ecosystem/grpc-gateway/pull/931) ([jhump](https://github.com/jhump)) -- ability to customize stream errors [\#930](https://github.com/grpc-ecosystem/grpc-gateway/pull/930) ([jhump](https://github.com/jhump)) - ## [v1.8.6](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.8.6) (2019-05-07) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.8.5...v1.8.6) @@ -714,15 +657,6 @@ - go get: error loading module requirements go 1.11 [\#915](https://github.com/grpc-ecosystem/grpc-gateway/issues/915) - gateway generation issue on windows [\#911](https://github.com/grpc-ecosystem/grpc-gateway/issues/911) -**Merged pull requests:** - -- Generate correct changelog version [\#929](https://github.com/grpc-ecosystem/grpc-gateway/pull/929) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Generate changelog for 1.8.6 [\#928](https://github.com/grpc-ecosystem/grpc-gateway/pull/928) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Use proto gen swagger with protos from external repository [\#924](https://github.com/grpc-ecosystem/grpc-gateway/pull/924) ([elenadeneva92](https://github.com/elenadeneva92)) -- Delete redundant load statement [\#922](https://github.com/grpc-ecosystem/grpc-gateway/pull/922) ([pcj](https://github.com/pcj)) -- Make gazelle diffs fail the build [\#916](https://github.com/grpc-ecosystem/grpc-gateway/pull/916) ([achew22](https://github.com/achew22)) -- Fixed empty path bug [\#913](https://github.com/grpc-ecosystem/grpc-gateway/pull/913) ([brycematheson1234](https://github.com/brycematheson1234)) - ## [v1.8.5](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.8.5) (2019-03-15) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.8.4...v1.8.5) @@ -730,11 +664,6 @@ - Swagger get query param documentation shows repeated fields incorrectly [\#756](https://github.com/grpc-ecosystem/grpc-gateway/issues/756) -**Merged pull requests:** - -- Generate changelog for 1.8.5 [\#910](https://github.com/grpc-ecosystem/grpc-gateway/pull/910) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- CollectionFormat multi for query params of repeated fields 2 [\#909](https://github.com/grpc-ecosystem/grpc-gateway/pull/909) ([bmperrea](https://github.com/bmperrea)) - ## [v1.8.4](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.8.4) (2019-03-13) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.8.3...v1.8.4) @@ -742,12 +671,6 @@ - Invalid swagger generated for bodies with repeated fields [\#906](https://github.com/grpc-ecosystem/grpc-gateway/issues/906) -**Merged pull requests:** - -- Generate changelog for 1.8.4 [\#908](https://github.com/grpc-ecosystem/grpc-gateway/pull/908) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Revert "Use collectionFormat multi for query params of repeated fields \(\#902\)" [\#907](https://github.com/grpc-ecosystem/grpc-gateway/pull/907) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- New proposal: support for the google.api.HttpBody [\#904](https://github.com/grpc-ecosystem/grpc-gateway/pull/904) ([wimspaargaren](https://github.com/wimspaargaren)) - ## [v1.8.3](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.8.3) (2019-03-11) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.8.2...v1.8.3) @@ -763,11 +686,6 @@ - Its impossible to send response with non 200 status code [\#901](https://github.com/grpc-ecosystem/grpc-gateway/issues/901) -**Merged pull requests:** - -- Regenerate changelog for 1.8.3 [\#903](https://github.com/grpc-ecosystem/grpc-gateway/pull/903) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Use collectionFormat multi for query params of repeated fields [\#902](https://github.com/grpc-ecosystem/grpc-gateway/pull/902) ([bmperrea](https://github.com/bmperrea)) - ## [v1.8.2](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.8.2) (2019-03-07) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.8.1...v1.8.2) @@ -784,29 +702,12 @@ - Description and title ignored when field is not a scaler value type [\#892](https://github.com/grpc-ecosystem/grpc-gateway/issues/892) -**Merged pull requests:** - -- Regenerate changelog for 1.8.2 [\#899](https://github.com/grpc-ecosystem/grpc-gateway/pull/899) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- 897 fixing problem while generating swagger documentation for enum messages [\#898](https://github.com/grpc-ecosystem/grpc-gateway/pull/898) ([fahernandez](https://github.com/fahernandez)) -- bugfix: disable IOReaderFactory for streaming requests [\#896](https://github.com/grpc-ecosystem/grpc-gateway/pull/896) ([happyalu](https://github.com/happyalu)) -- bazel: Use new ProtoInfo provider [\#893](https://github.com/grpc-ecosystem/grpc-gateway/pull/893) ([drigz](https://github.com/drigz)) -- README: Add some nicer looking badges [\#890](https://github.com/grpc-ecosystem/grpc-gateway/pull/890) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Upgrade generator and runtime versions [\#889](https://github.com/grpc-ecosystem/grpc-gateway/pull/889) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.8.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.8.1) (2019-03-02) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.8.1-pre1...v1.8.1) -**Merged pull requests:** - -- Generate changelog for v1.8.1 [\#887](https://github.com/grpc-ecosystem/grpc-gateway/pull/887) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.8.1-pre1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.8.1-pre1) (2019-03-01) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.8.0...v1.8.1-pre1) -**Merged pull requests:** - -- CI: fix release builds [\#884](https://github.com/grpc-ecosystem/grpc-gateway/pull/884) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.8.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.8.0) (2019-03-01) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.7.0...v1.8.0) @@ -831,24 +732,6 @@ - Mac OS X - Note about your tutorial [\#787](https://github.com/grpc-ecosystem/grpc-gateway/issues/787) - Returning 302 redirect as response [\#607](https://github.com/grpc-ecosystem/grpc-gateway/issues/607) -**Merged pull requests:** - -- Generate changelog for 1.8.0 [\#883](https://github.com/grpc-ecosystem/grpc-gateway/pull/883) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Read only support [\#882](https://github.com/grpc-ecosystem/grpc-gateway/pull/882) ([hypnoce](https://github.com/hypnoce)) -- Add fqn\_for\_swagger\_name option [\#881](https://github.com/grpc-ecosystem/grpc-gateway/pull/881) ([hypnoce](https://github.com/hypnoce)) -- go.mod: update grpc from v1.16.0 to v1.17.0 [\#880](https://github.com/grpc-ecosystem/grpc-gateway/pull/880) ([klim0v](https://github.com/klim0v)) -- Fix parameter names when using JSON names. [\#879](https://github.com/grpc-ecosystem/grpc-gateway/pull/879) ([brocaar](https://github.com/brocaar)) -- protoc-gen-swagger: return error when encoding swagger file [\#878](https://github.com/grpc-ecosystem/grpc-gateway/pull/878) ([elliots](https://github.com/elliots)) -- protoc-gen-grpc-gateway: use context package from stdlib [\#876](https://github.com/grpc-ecosystem/grpc-gateway/pull/876) ([simonpasquier](https://github.com/simonpasquier)) -- Run buildifer on WORKSPACE [\#875](https://github.com/grpc-ecosystem/grpc-gateway/pull/875) ([achew22](https://github.com/achew22)) -- Upgrade to rules\_go 0.17.0 [\#874](https://github.com/grpc-ecosystem/grpc-gateway/pull/874) ([achew22](https://github.com/achew22)) -- Switch to go modules [\#870](https://github.com/grpc-ecosystem/grpc-gateway/pull/870) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- 868 improving README with AWS API gateway findings [\#869](https://github.com/grpc-ecosystem/grpc-gateway/pull/869) ([fahernandez](https://github.com/fahernandez)) -- Updated Service, Method, Message Identifiers to be CamelCased [\#866](https://github.com/grpc-ecosystem/grpc-gateway/pull/866) ([waveywaves](https://github.com/waveywaves)) -- 863 adding swagger annotation support for enum and nested objects [\#865](https://github.com/grpc-ecosystem/grpc-gateway/pull/865) ([fahernandez](https://github.com/fahernandez)) -- Update CI badge link in documentation [\#862](https://github.com/grpc-ecosystem/grpc-gateway/pull/862) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- protoc-gen-swagger: add the package name to the tags field of each endpoint if the package name exists in the proto file [\#860](https://github.com/grpc-ecosystem/grpc-gateway/pull/860) ([zwcn](https://github.com/zwcn)) - ## [v1.7.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.7.0) (2019-01-23) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.6.4...v1.7.0) @@ -857,19 +740,6 @@ - Error to build project with go module [\#846](https://github.com/grpc-ecosystem/grpc-gateway/issues/846) - Result of gateway's Stream response is wrapped with "result" [\#579](https://github.com/grpc-ecosystem/grpc-gateway/issues/579) -**Merged pull requests:** - -- Generate changelog for 1.7.0 [\#858](https://github.com/grpc-ecosystem/grpc-gateway/pull/858) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Use github.com/golang/protobuf/descriptor ForMessage and fix CI from not rebasing [\#857](https://github.com/grpc-ecosystem/grpc-gateway/pull/857) ([mechinn](https://github.com/mechinn)) -- marshal\_jsonpb: add check for slice sub types implementing proto.Message [\#856](https://github.com/grpc-ecosystem/grpc-gateway/pull/856) ([abice](https://github.com/abice)) -- Added WithDisablePathLengthFallback option \(to fix issue \#447\) [\#855](https://github.com/grpc-ecosystem/grpc-gateway/pull/855) ([UladzimirTrehubenka](https://github.com/UladzimirTrehubenka)) -- marshal\_jsonpb: Added nil slice default value [\#854](https://github.com/grpc-ecosystem/grpc-gateway/pull/854) ([abice](https://github.com/abice)) -- Add flag 'allow\_repeated\_fields\_in\_body' to protoc-gen-swagger [\#853](https://github.com/grpc-ecosystem/grpc-gateway/pull/853) ([abice](https://github.com/abice)) -- Adding support for default and required swagger annotation fields. [\#852](https://github.com/grpc-ecosystem/grpc-gateway/pull/852) ([fahernandez](https://github.com/fahernandez)) -- make generated swagger json match gateway behavior for server streams [\#850](https://github.com/grpc-ecosystem/grpc-gateway/pull/850) ([mechinn](https://github.com/mechinn)) -- test: "fill attributes of swagger schema if provided for messages" [\#849](https://github.com/grpc-ecosystem/grpc-gateway/pull/849) ([srenatus](https://github.com/srenatus)) -- Fix the generated URL in the changelog [\#845](https://github.com/grpc-ecosystem/grpc-gateway/pull/845) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.6.4](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.6.4) (2019-01-08) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.6.3...v1.6.4) @@ -878,13 +748,6 @@ - feature request: opt-out fieldmask behaviour in patch [\#839](https://github.com/grpc-ecosystem/grpc-gateway/issues/839) - gRPC streaming keepAlive doesn't work with docker swarm [\#838](https://github.com/grpc-ecosystem/grpc-gateway/issues/838) -**Merged pull requests:** - -- Generate changelog for 1.6.4 [\#843](https://github.com/grpc-ecosystem/grpc-gateway/pull/843) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Update bazel dependencies [\#841](https://github.com/grpc-ecosystem/grpc-gateway/pull/841) ([achew22](https://github.com/achew22)) -- gengateway: allow opting out patch feature [\#840](https://github.com/grpc-ecosystem/grpc-gateway/pull/840) ([glerchundi](https://github.com/glerchundi)) -- Fix the url of gRPC timeouts on README.md [\#836](https://github.com/grpc-ecosystem/grpc-gateway/pull/836) ([royeo](https://github.com/royeo)) - ## [v1.6.3](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.6.3) (2018-12-21) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.6.2...v1.6.3) @@ -892,13 +755,6 @@ - Issue with google.protobuf.Empty representation in swagger file [\#831](https://github.com/grpc-ecosystem/grpc-gateway/issues/831) -**Merged pull requests:** - -- Regenerate changelog for 1.6.3 [\#835](https://github.com/grpc-ecosystem/grpc-gateway/pull/835) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- protoc-gen-swagger: check typeIndex when typeName is Method [\#833](https://github.com/grpc-ecosystem/grpc-gateway/pull/833) ([hexfusion](https://github.com/hexfusion)) -- Replace complicated circle CI release with goreleaser. [\#828](https://github.com/grpc-ecosystem/grpc-gateway/pull/828) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Stop the publishing recursion [\#827](https://github.com/grpc-ecosystem/grpc-gateway/pull/827) ([achew22](https://github.com/achew22)) - ## [v1.6.2](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.6.2) (2018-12-07) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.6.0...v1.6.2) @@ -908,10 +764,6 @@ ## [v1.6.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.6.1) (2018-12-07) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.5.1...v1.6.1) -**Implemented enhancements:** - -- Add 'License' message to the annotation proto. [\#644](https://github.com/grpc-ecosystem/grpc-gateway/pull/644) ([ensonic](https://github.com/ensonic)) - **Fixed bugs:** - Cannot return HTTP header using "Grpc-Metadata-" prefix [\#782](https://github.com/grpc-ecosystem/grpc-gateway/issues/782) @@ -931,34 +783,6 @@ - Go1.11: http.CloseNotifier is deprecated [\#736](https://github.com/grpc-ecosystem/grpc-gateway/issues/736) - Access to raw post body [\#652](https://github.com/grpc-ecosystem/grpc-gateway/issues/652) -**Merged pull requests:** - -- Write version to intermediate file for release publish [\#826](https://github.com/grpc-ecosystem/grpc-gateway/pull/826) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Check out code before calling ghr [\#825](https://github.com/grpc-ecosystem/grpc-gateway/pull/825) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Generate changelog for 1.6.0 [\#824](https://github.com/grpc-ecosystem/grpc-gateway/pull/824) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Add filegroup for options proto files [\#821](https://github.com/grpc-ecosystem/grpc-gateway/pull/821) ([kellycampbell](https://github.com/kellycampbell)) -- Added support for more WKT [\#816](https://github.com/grpc-ecosystem/grpc-gateway/pull/816) ([mayankcpdixit](https://github.com/mayankcpdixit)) -- Fix protobuf repository's owner name on README.md [\#814](https://github.com/grpc-ecosystem/grpc-gateway/pull/814) ([micnncim](https://github.com/micnncim)) -- Revert "Adding support for more well known types in descriptor" [\#813](https://github.com/grpc-ecosystem/grpc-gateway/pull/813) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Feature/patch2 rebased [\#812](https://github.com/grpc-ecosystem/grpc-gateway/pull/812) ([razamiDev](https://github.com/razamiDev)) -- Correct wellKnownTypeConv function references [\#811](https://github.com/grpc-ecosystem/grpc-gateway/pull/811) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Adding support for more well known types in descriptor [\#809](https://github.com/grpc-ecosystem/grpc-gateway/pull/809) ([mayankcpdixit](https://github.com/mayankcpdixit)) -- Make Bazel CI failures clearer [\#807](https://github.com/grpc-ecosystem/grpc-gateway/pull/807) ([drigz](https://github.com/drigz)) -- fix bug: the resource name of custom method doesn't be retained [\#805](https://github.com/grpc-ecosystem/grpc-gateway/pull/805) ([ch3rub1m](https://github.com/ch3rub1m)) -- Update rules\_go and gazelle [\#802](https://github.com/grpc-ecosystem/grpc-gateway/pull/802) ([drigz](https://github.com/drigz)) -- Properly omit wrappers and google.protobuf.empty from swagger definitions [\#801](https://github.com/grpc-ecosystem/grpc-gateway/pull/801) ([birdayz](https://github.com/birdayz)) -- protoc-gen-swagger: honor example field of message option [\#799](https://github.com/grpc-ecosystem/grpc-gateway/pull/799) ([birdayz](https://github.com/birdayz)) -- Use newer Bazel repo rules [\#798](https://github.com/grpc-ecosystem/grpc-gateway/pull/798) ([drigz](https://github.com/drigz)) -- Run buildifer on Bazel files [\#797](https://github.com/grpc-ecosystem/grpc-gateway/pull/797) ([drigz](https://github.com/drigz)) -- protoc-gen-swagger: Fix formatting of license field definition. [\#796](https://github.com/grpc-ecosystem/grpc-gateway/pull/796) ([ivucica](https://github.com/ivucica)) -- Remove http.CloseNotifier code from Go \>= 1.7 builds [\#795](https://github.com/grpc-ecosystem/grpc-gateway/pull/795) ([SpikesDivZero](https://github.com/SpikesDivZero)) -- ci: add job for building binaries for releases [\#793](https://github.com/grpc-ecosystem/grpc-gateway/pull/793) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Add documentation to the rest of methods on the examples [\#791](https://github.com/grpc-ecosystem/grpc-gateway/pull/791) ([rvegas](https://github.com/rvegas)) -- fix \#782 Cannot return HTTP header using "Grpc-Metadata-" prefix [\#784](https://github.com/grpc-ecosystem/grpc-gateway/pull/784) ([joelclouddistrict](https://github.com/joelclouddistrict)) -- Fix CircleCI configuration [\#777](https://github.com/grpc-ecosystem/grpc-gateway/pull/777) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- tests: s/iotuil/ioutil/ typo [\#775](https://github.com/grpc-ecosystem/grpc-gateway/pull/775) ([srenatus](https://github.com/srenatus)) -- Replace travis with CircleCI for easier testing [\#772](https://github.com/grpc-ecosystem/grpc-gateway/pull/772) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.5.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.5.1) (2018-10-02) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.5.0...v1.5.1) @@ -982,15 +806,6 @@ - Can you differentiate between an empty map vs field not provided? [\#552](https://github.com/grpc-ecosystem/grpc-gateway/issues/552) - import\_path option not working as intended [\#536](https://github.com/grpc-ecosystem/grpc-gateway/issues/536) -**Merged pull requests:** - -- Add default value for swagger 200 response [\#767](https://github.com/grpc-ecosystem/grpc-gateway/pull/767) ([johnchildren](https://github.com/johnchildren)) -- Generate changelog for release v1.5.1 [\#764](https://github.com/grpc-ecosystem/grpc-gateway/pull/764) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Revert \#708 since it breaks backwards compatibility [\#761](https://github.com/grpc-ecosystem/grpc-gateway/pull/761) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Update README.md [\#757](https://github.com/grpc-ecosystem/grpc-gateway/pull/757) ([wora](https://github.com/wora)) -- Added camelCase Example [\#751](https://github.com/grpc-ecosystem/grpc-gateway/pull/751) ([srikrsna](https://github.com/srikrsna)) -- Add more guidance to issue template [\#750](https://github.com/grpc-ecosystem/grpc-gateway/pull/750) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.5.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.5.0) (2018-09-09) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.4.1...v1.5.0) @@ -1028,34 +843,6 @@ - docs: show example of tracing over http-\>grpc boundary [\#348](https://github.com/grpc-ecosystem/grpc-gateway/issues/348) - Response codes and descriptions in Swagger docs [\#304](https://github.com/grpc-ecosystem/grpc-gateway/issues/304) -**Merged pull requests:** - -- Generate release notes for v1.5.0 [\#749](https://github.com/grpc-ecosystem/grpc-gateway/pull/749) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Add missing modules to browser example [\#743](https://github.com/grpc-ecosystem/grpc-gateway/pull/743) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Added support for path param repeated fields [\#742](https://github.com/grpc-ecosystem/grpc-gateway/pull/742) ([maros7](https://github.com/maros7)) -- Add support for enum path parameters [\#738](https://github.com/grpc-ecosystem/grpc-gateway/pull/738) ([maros7](https://github.com/maros7)) -- Add support to forward grpc binary metadata [\#737](https://github.com/grpc-ecosystem/grpc-gateway/pull/737) ([timonwong](https://github.com/timonwong)) -- Lock versions to tags where possible [\#724](https://github.com/grpc-ecosystem/grpc-gateway/pull/724) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- install-protoc was checking version from wrong executable path [\#721](https://github.com/grpc-ecosystem/grpc-gateway/pull/721) ([temoto](https://github.com/temoto)) -- Fix naming convention of JSON Schema didn't matched with the spec [\#719](https://github.com/grpc-ecosystem/grpc-gateway/pull/719) ([co3k](https://github.com/co3k)) -- Add message field to the error message emitted by grpc-gateway [\#718](https://github.com/grpc-ecosystem/grpc-gateway/pull/718) ([ffredsh](https://github.com/ffredsh)) -- Fix up examples [\#715](https://github.com/grpc-ecosystem/grpc-gateway/pull/715) ([achew22](https://github.com/achew22)) -- Support HttpRule with field response [\#712](https://github.com/grpc-ecosystem/grpc-gateway/pull/712) ([doroginin](https://github.com/doroginin)) -- Make support paths option [\#711](https://github.com/grpc-ecosystem/grpc-gateway/pull/711) ([izumin5210](https://github.com/izumin5210)) -- Add test case and proposed fix for path component with trailing colon \(and string\) [\#708](https://github.com/grpc-ecosystem/grpc-gateway/pull/708) ([jfhamlin](https://github.com/jfhamlin)) -- add OpenTracing support to docs [\#705](https://github.com/grpc-ecosystem/grpc-gateway/pull/705) ([theRealWardo](https://github.com/theRealWardo)) -- add support for resource name in swagger plugin \(\#702\) [\#704](https://github.com/grpc-ecosystem/grpc-gateway/pull/704) ([ch3rub1m](https://github.com/ch3rub1m)) -- Add explicit dependency versions [\#696](https://github.com/grpc-ecosystem/grpc-gateway/pull/696) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- protoc-gen-swagger: support all well-known wrapper types [\#695](https://github.com/grpc-ecosystem/grpc-gateway/pull/695) ([jriecken](https://github.com/jriecken)) -- runtime: add support for time types in query parameters [\#693](https://github.com/grpc-ecosystem/grpc-gateway/pull/693) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- Populate swagger method parameter description from message comments [\#692](https://github.com/grpc-ecosystem/grpc-gateway/pull/692) ([co3k](https://github.com/co3k)) -- Updated doc and comments to reflect Permanent HTTP header keys prefixing [\#691](https://github.com/grpc-ecosystem/grpc-gateway/pull/691) ([crozzy](https://github.com/crozzy)) -- protoc-gen-swagger: support JSON Schema Validation properties and add openapiv2\_field option [\#687](https://github.com/grpc-ecosystem/grpc-gateway/pull/687) ([co3k](https://github.com/co3k)) -- Bazel expose protoc-gen-grpc-gateway [\#668](https://github.com/grpc-ecosystem/grpc-gateway/pull/668) ([emcfarlane](https://github.com/emcfarlane)) -- Fix protoc-gen-swagger to output gRPC method summary and descriptions as Swagger's them [\#667](https://github.com/grpc-ecosystem/grpc-gateway/pull/667) ([co3k](https://github.com/co3k)) -- Allow explicit empty security definition to overwrite existing definitions [\#666](https://github.com/grpc-ecosystem/grpc-gateway/pull/666) ([co3k](https://github.com/co3k)) -- protoc-gen-swagger: Add ability to specify custom response objects [\#663](https://github.com/grpc-ecosystem/grpc-gateway/pull/663) ([johanbrandhorst](https://github.com/johanbrandhorst)) - ## [v1.4.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.4.1) (2018-05-23) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.4.0...v1.4.1) @@ -1063,11 +850,6 @@ - Next release ? [\#605](https://github.com/grpc-ecosystem/grpc-gateway/issues/605) -**Merged pull requests:** - -- Generate release notes for v1.4.1 [\#659](https://github.com/grpc-ecosystem/grpc-gateway/pull/659) ([achew22](https://github.com/achew22)) -- Translate gRPC FailedPrecondition as HTTP PreconditionFailed [\#657](https://github.com/grpc-ecosystem/grpc-gateway/pull/657) ([slomek](https://github.com/slomek)) - ## [v1.4.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.4.0) (2018-05-20) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.3.1...v1.4.0) @@ -1109,66 +891,6 @@ - Move to stdlib context over x/net/context [\#326](https://github.com/grpc-ecosystem/grpc-gateway/issues/326) - deprecate 1.6 and embrace \(\*http.Request\).Context by default [\#313](https://github.com/grpc-ecosystem/grpc-gateway/issues/313) -**Merged pull requests:** - -- Generate a single swagger definition on demand [\#658](https://github.com/grpc-ecosystem/grpc-gateway/pull/658) ([achew22](https://github.com/achew22)) -- Regenerate example files [\#656](https://github.com/grpc-ecosystem/grpc-gateway/pull/656) ([achew22](https://github.com/achew22)) -- Add v1.4.0 changelog [\#655](https://github.com/grpc-ecosystem/grpc-gateway/pull/655) ([achew22](https://github.com/achew22)) -- Replace the deprecated grpclog.Printf with grpclog.Infof [\#654](https://github.com/grpc-ecosystem/grpc-gateway/pull/654) ([a-robinson](https://github.com/a-robinson)) -- Add README.md for examples [\#645](https://github.com/grpc-ecosystem/grpc-gateway/pull/645) ([liukgg](https://github.com/liukgg)) -- JSONPb marshaler panics if input is nil interface [\#639](https://github.com/grpc-ecosystem/grpc-gateway/pull/639) ([jhump](https://github.com/jhump)) -- provide access to underlying \*json.Decoder from JSONPb.NewDecoder [\#637](https://github.com/grpc-ecosystem/grpc-gateway/pull/637) ([jhump](https://github.com/jhump)) -- fix compile errors caused by protobuf finally merging their dev branch to master [\#636](https://github.com/grpc-ecosystem/grpc-gateway/pull/636) ([jhump](https://github.com/jhump)) -- Generate import mappings. [\#635](https://github.com/grpc-ecosystem/grpc-gateway/pull/635) ([ensonic](https://github.com/ensonic)) -- Add support for the grpc\_api\_configuration option in the bazel rule. [\#632](https://github.com/grpc-ecosystem/grpc-gateway/pull/632) ([ensonic](https://github.com/ensonic)) -- Use repo relative labels in protoc-gen-swagger [\#631](https://github.com/grpc-ecosystem/grpc-gateway/pull/631) ([achew22](https://github.com/achew22)) -- Correct dependencies in Makefile [\#626](https://github.com/grpc-ecosystem/grpc-gateway/pull/626) ([yugui](https://github.com/yugui)) -- Avoid timing issues in the integration tests [\#624](https://github.com/grpc-ecosystem/grpc-gateway/pull/624) ([yugui](https://github.com/yugui)) -- Fix typos in gRPC API Configuration usage documentation [\#623](https://github.com/grpc-ecosystem/grpc-gateway/pull/623) ([hacst](https://github.com/hacst)) -- Skip unnecessary steps in USE\_BAZEL builds on TravisCI [\#622](https://github.com/grpc-ecosystem/grpc-gateway/pull/622) ([yugui](https://github.com/yugui)) -- Support param for field from Oneof definition. [\#621](https://github.com/grpc-ecosystem/grpc-gateway/pull/621) ([bonafideyan](https://github.com/bonafideyan)) -- Fixes file integrity errors on TravisCI [\#619](https://github.com/grpc-ecosystem/grpc-gateway/pull/619) ([yugui](https://github.com/yugui)) -- Reorganize examples [\#618](https://github.com/grpc-ecosystem/grpc-gateway/pull/618) ([yugui](https://github.com/yugui)) -- Update dependency declarations in the Makefile [\#617](https://github.com/grpc-ecosystem/grpc-gateway/pull/617) ([yugui](https://github.com/yugui)) -- Support delete method in swagger generator [\#616](https://github.com/grpc-ecosystem/grpc-gateway/pull/616) ([beerose](https://github.com/beerose)) -- feat\(bazel\): Add rule for generating .swagger.json files [\#613](https://github.com/grpc-ecosystem/grpc-gateway/pull/613) ([mrmeku](https://github.com/mrmeku)) -- Support UNIX domain socket in the example servers [\#609](https://github.com/grpc-ecosystem/grpc-gateway/pull/609) ([yugui](https://github.com/yugui)) -- misspelling [\#601](https://github.com/grpc-ecosystem/grpc-gateway/pull/601) ([chemidy](https://github.com/chemidy)) -- Pulled out parseReq func into a generic package + tests [\#600](https://github.com/grpc-ecosystem/grpc-gateway/pull/600) ([f0rmiga](https://github.com/f0rmiga)) -- Added Bazel support [\#599](https://github.com/grpc-ecosystem/grpc-gateway/pull/599) ([f0rmiga](https://github.com/f0rmiga)) -- Add basic docs section [\#597](https://github.com/grpc-ecosystem/grpc-gateway/pull/597) ([achew22](https://github.com/achew22)) -- Upgrade to go1.10 and regenerate [\#596](https://github.com/grpc-ecosystem/grpc-gateway/pull/596) ([achew22](https://github.com/achew22)) -- Support cases where the request is done with transfer-encoding chunked [\#589](https://github.com/grpc-ecosystem/grpc-gateway/pull/589) ([jacksontj](https://github.com/jacksontj)) -- Support multiple metadata annotators [\#586](https://github.com/grpc-ecosystem/grpc-gateway/pull/586) ([dmacthedestroyer](https://github.com/dmacthedestroyer)) -- Changed to use more appropriate http status code for ResourceExhausted [\#580](https://github.com/grpc-ecosystem/grpc-gateway/pull/580) ([eleniums](https://github.com/eleniums)) -- Stop marshalling any.Any types unnecessarily. [\#577](https://github.com/grpc-ecosystem/grpc-gateway/pull/577) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- fix racy access of err variable [\#575](https://github.com/grpc-ecosystem/grpc-gateway/pull/575) ([jhump](https://github.com/jhump)) -- option to tweak generated Register\* function names [\#571](https://github.com/grpc-ecosystem/grpc-gateway/pull/571) ([jhump](https://github.com/jhump)) -- runtime: return 503 not 403 with ResourceExhausted. [\#569](https://github.com/grpc-ecosystem/grpc-gateway/pull/569) ([hexfusion](https://github.com/hexfusion)) -- \[\]byte in query now uses base64.StdEncoding [\#565](https://github.com/grpc-ecosystem/grpc-gateway/pull/565) ([lucasvo](https://github.com/lucasvo)) -- Add 3rd party rpc protos in order to have access to status and error [\#563](https://github.com/grpc-ecosystem/grpc-gateway/pull/563) ([rvegas](https://github.com/rvegas)) -- Add details to stream error response [\#561](https://github.com/grpc-ecosystem/grpc-gateway/pull/561) ([johanbrandhorst](https://github.com/johanbrandhorst)) -- fix noenc error by fixing Details error field [\#557](https://github.com/grpc-ecosystem/grpc-gateway/pull/557) ([srenatus](https://github.com/srenatus)) -- error details: add @type key by switching to any.Any [\#553](https://github.com/grpc-ecosystem/grpc-gateway/pull/553) ([srenatus](https://github.com/srenatus)) -- Add a FAQ [\#550](https://github.com/grpc-ecosystem/grpc-gateway/pull/550) ([achew22](https://github.com/achew22)) -- Add security fields support to protoc-gen-swagger [\#547](https://github.com/grpc-ecosystem/grpc-gateway/pull/547) ([ivucica](https://github.com/ivucica)) -- Omit well-known type definitions from swagger output [\#541](https://github.com/grpc-ecosystem/grpc-gateway/pull/541) ([alexleigh](https://github.com/alexleigh)) -- Use importPath to set package name rather than package path. [\#537](https://github.com/grpc-ecosystem/grpc-gateway/pull/537) ([rwlincoln](https://github.com/rwlincoln)) -- Support for map type in query string [\#535](https://github.com/grpc-ecosystem/grpc-gateway/pull/535) ([adamstruck](https://github.com/adamstruck)) -- Fix error message in protoc-gen-grpc-gateway \(for \#531\) [\#532](https://github.com/grpc-ecosystem/grpc-gateway/pull/532) ([budougumi0617](https://github.com/budougumi0617)) -- runtime: support FieldMask as query param [\#529](https://github.com/grpc-ecosystem/grpc-gateway/pull/529) ([glerchundi](https://github.com/glerchundi)) -- Fix decoding empty request body [\#527](https://github.com/grpc-ecosystem/grpc-gateway/pull/527) ([syhpoon](https://github.com/syhpoon)) -- Add description, summary and tags fields in operationObject \(swagger\) [\#526](https://github.com/grpc-ecosystem/grpc-gateway/pull/526) ([devnull-](https://github.com/devnull-)) -- Converts the first letter of service name to uppercase [\#522](https://github.com/grpc-ecosystem/grpc-gateway/pull/522) ([thurt](https://github.com/thurt)) -- Add support for basic gRPC API Configuration YAML files [\#521](https://github.com/grpc-ecosystem/grpc-gateway/pull/521) ([hacst](https://github.com/hacst)) -- Fix travis to only difftest on go 1.9 [\#520](https://github.com/grpc-ecosystem/grpc-gateway/pull/520) ([achew22](https://github.com/achew22)) -- add error details to error json [\#515](https://github.com/grpc-ecosystem/grpc-gateway/pull/515) ([srenatus](https://github.com/srenatus)) -- ci: add codecov [\#514](https://github.com/grpc-ecosystem/grpc-gateway/pull/514) ([tmc](https://github.com/tmc)) -- Generate "Description" and "TermsOfService" fields [\#512](https://github.com/grpc-ecosystem/grpc-gateway/pull/512) ([lukasmalkmus](https://github.com/lukasmalkmus)) -- Release 1.3.1 [\#509](https://github.com/grpc-ecosystem/grpc-gateway/pull/509) ([tmc](https://github.com/tmc)) -- Support mapping bytes to \[\]byte [\#489](https://github.com/grpc-ecosystem/grpc-gateway/pull/489) ([loderunner](https://github.com/loderunner)) -- properly respect file flag for protoc-gen-swagger [\#293](https://github.com/grpc-ecosystem/grpc-gateway/pull/293) ([tmc](https://github.com/tmc)) - ## [v1.3.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.3.1) (2017-12-23) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.3...v1.3.1) @@ -1213,19 +935,6 @@ - Support combination of query params and body for POSTs with body: "\*" [\#234](https://github.com/grpc-ecosystem/grpc-gateway/issues/234) - Interceptor [\#221](https://github.com/grpc-ecosystem/grpc-gateway/issues/221) -**Merged pull requests:** - -- Add support for --Import\_path [\#507](https://github.com/grpc-ecosystem/grpc-gateway/pull/507) ([achew22](https://github.com/achew22)) -- Fix \#504 Missing Definitions [\#505](https://github.com/grpc-ecosystem/grpc-gateway/pull/505) ([warmans](https://github.com/warmans)) -- Maintain default delimiter of newline [\#497](https://github.com/grpc-ecosystem/grpc-gateway/pull/497) ([jacksontj](https://github.com/jacksontj)) -- Fix gen-swagger to support more well known types [\#496](https://github.com/grpc-ecosystem/grpc-gateway/pull/496) ([shouichi](https://github.com/shouichi)) -- Use golang/protobuf instead of gogo/protobuf [\#494](https://github.com/grpc-ecosystem/grpc-gateway/pull/494) ([shouichi](https://github.com/shouichi)) -- Fix stream delimiters [\#488](https://github.com/grpc-ecosystem/grpc-gateway/pull/488) ([emcfarlane](https://github.com/emcfarlane)) -- ForwardResponseStream status code errors [\#482](https://github.com/grpc-ecosystem/grpc-gateway/pull/482) ([emcfarlane](https://github.com/emcfarlane)) -- protoc-gen-grpc-gateway: flip request\_context default to true [\#474](https://github.com/grpc-ecosystem/grpc-gateway/pull/474) ([srenatus](https://github.com/srenatus)) -- grpc-gateway/generator: respect full package [\#462](https://github.com/grpc-ecosystem/grpc-gateway/pull/462) ([glerchundi](https://github.com/glerchundi)) -- Add proto marshaller for proto-over-http [\#459](https://github.com/grpc-ecosystem/grpc-gateway/pull/459) ([MatthewDolan](https://github.com/MatthewDolan)) - ## [v1.3](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.3) (2017-11-03) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.3.0...v1.3) @@ -1270,43 +979,9 @@ - Allow whitelisting of particular HTTP headers to map to metadata. [\#253](https://github.com/grpc-ecosystem/grpc-gateway/issues/253) - Swagger definitions don't handle parameters that are not explicitly required in the url [\#159](https://github.com/grpc-ecosystem/grpc-gateway/issues/159) -**Merged pull requests:** - -- Fix wrong method names [\#603](https://github.com/grpc-ecosystem/grpc-gateway/pull/603) ([yugui](https://github.com/yugui)) -- Streaming forward handler fix chunk encoding [\#479](https://github.com/grpc-ecosystem/grpc-gateway/pull/479) ([emcfarlane](https://github.com/emcfarlane)) -- Fix logic handling primitive wrapper in URL params [\#478](https://github.com/grpc-ecosystem/grpc-gateway/pull/478) ([tgeng](https://github.com/tgeng)) -- runtime: use r.Context\(\) [\#473](https://github.com/grpc-ecosystem/grpc-gateway/pull/473) ([srenatus](https://github.com/srenatus)) -- Optional SourceCodeInfo [\#466](https://github.com/grpc-ecosystem/grpc-gateway/pull/466) ([emcfarlane](https://github.com/emcfarlane)) -- Some steps to fix Travis CI [\#461](https://github.com/grpc-ecosystem/grpc-gateway/pull/461) ([AlekSi](https://github.com/AlekSi)) -- fix 2 typos in Registry.SetPrefix's comment [\#455](https://github.com/grpc-ecosystem/grpc-gateway/pull/455) ([hectorj](https://github.com/hectorj)) -- Add Handler method to pass in client [\#454](https://github.com/grpc-ecosystem/grpc-gateway/pull/454) ([jacksontj](https://github.com/jacksontj)) -- Fallback to JSON name when matching URL parameter. [\#450](https://github.com/grpc-ecosystem/grpc-gateway/pull/450) ([tgeng](https://github.com/tgeng)) -- Update DO NOT EDIT template. [\#434](https://github.com/grpc-ecosystem/grpc-gateway/pull/434) ([AlekSi](https://github.com/AlekSi)) -- Memoise calls to fullyQualifiedNameToSwaggerName to speed it up for large registries [\#421](https://github.com/grpc-ecosystem/grpc-gateway/pull/421) ([peterebden](https://github.com/peterebden)) -- Update Swagger Codegen from 2.1.6 to 2.2.2 [\#415](https://github.com/grpc-ecosystem/grpc-gateway/pull/415) ([yugui](https://github.com/yugui)) -- Return codes.InvalidArgument to rather return HTTP 400 instead of HTTP 500 [\#409](https://github.com/grpc-ecosystem/grpc-gateway/pull/409) ([vaporz](https://github.com/vaporz)) -- improve {incoming,outgoing}HeaderMatcher logic [\#408](https://github.com/grpc-ecosystem/grpc-gateway/pull/408) ([flisky](https://github.com/flisky)) -- improve WKT handling in gateway and openapi output [\#404](https://github.com/grpc-ecosystem/grpc-gateway/pull/404) ([tmc](https://github.com/tmc)) -- Return if runtime.AnnotateContext gave error [\#403](https://github.com/grpc-ecosystem/grpc-gateway/pull/403) ([tamalsaha](https://github.com/tamalsaha)) -- jsonpb: update tests to reflect new jsonpb behavior [\#401](https://github.com/grpc-ecosystem/grpc-gateway/pull/401) ([tmc](https://github.com/tmc)) -- Reference import grpc Status to suppress unused errors. [\#387](https://github.com/grpc-ecosystem/grpc-gateway/pull/387) ([tamalsaha](https://github.com/tamalsaha)) -- ci: regen with current protoc-gen-go [\#385](https://github.com/grpc-ecosystem/grpc-gateway/pull/385) ([tmc](https://github.com/tmc)) -- Use status package for error and introduce WithProtoErrorHandler option [\#378](https://github.com/grpc-ecosystem/grpc-gateway/pull/378) ([kazegusuri](https://github.com/kazegusuri)) -- Return response headers from grpc server [\#374](https://github.com/grpc-ecosystem/grpc-gateway/pull/374) ([tamalsaha](https://github.com/tamalsaha)) -- Skip unreferenced messages in definitions. [\#371](https://github.com/grpc-ecosystem/grpc-gateway/pull/371) ([lantame](https://github.com/lantame)) -- Use canonical header form in default header matcher. [\#369](https://github.com/grpc-ecosystem/grpc-gateway/pull/369) ([tamalsaha](https://github.com/tamalsaha)) -- support allow\_delete\_body for protoc-gen-grpc-gateway [\#318](https://github.com/grpc-ecosystem/grpc-gateway/pull/318) ([flisky](https://github.com/flisky)) -- fixes package name override doesn't work [\#277](https://github.com/grpc-ecosystem/grpc-gateway/pull/277) ([favadi](https://github.com/favadi)) -- add custom options to allow more control of swagger/openapi output [\#145](https://github.com/grpc-ecosystem/grpc-gateway/pull/145) ([ivucica](https://github.com/ivucica)) - ## [v1.2.2](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.2.2) (2017-04-17) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.2.1...v1.2.2) -**Merged pull requests:** - -- Add changelog for 1.2.2 [\#363](https://github.com/grpc-ecosystem/grpc-gateway/pull/363) ([tmc](https://github.com/tmc)) -- metadata: fix properly and change to Outgoing [\#361](https://github.com/grpc-ecosystem/grpc-gateway/pull/361) ([tmc](https://github.com/tmc)) - ## [v1.2.1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.2.1) (2017-04-17) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.2.0...v1.2.1) @@ -1320,11 +995,6 @@ - Release 1.2.0 [\#340](https://github.com/grpc-ecosystem/grpc-gateway/issues/340) - Cut another release [\#278](https://github.com/grpc-ecosystem/grpc-gateway/issues/278) -**Merged pull requests:** - -- Add changelog for 1.2.1 [\#360](https://github.com/grpc-ecosystem/grpc-gateway/pull/360) ([tmc](https://github.com/tmc)) -- bugfix: reflect upstream api change. [\#359](https://github.com/grpc-ecosystem/grpc-gateway/pull/359) ([tmc](https://github.com/tmc)) - ## [v1.2.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.2.0) (2017-03-31) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.2.0.rc1...v1.2.0) @@ -1333,17 +1003,12 @@ - Problem with \*.proto as "no buildable Go source files" [\#338](https://github.com/grpc-ecosystem/grpc-gateway/issues/338) - Invalid import during code generation [\#337](https://github.com/grpc-ecosystem/grpc-gateway/issues/337) -**Merged pull requests:** - -- Add changelog for 1.2.0 [\#342](https://github.com/grpc-ecosystem/grpc-gateway/pull/342) ([tmc](https://github.com/tmc)) - ## [v1.2.0.rc1](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.2.0.rc1) (2017-03-24) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.1.0...v1.2.0.rc1) **Implemented enhancements:** - Support for Any types [\#80](https://github.com/grpc-ecosystem/grpc-gateway/issues/80) -- improve\(genswagger:template\):added support for google.protobuf.Timestamp [\#209](https://github.com/grpc-ecosystem/grpc-gateway/pull/209) ([EranAvidor](https://github.com/EranAvidor)) **Fixed bugs:** @@ -1415,50 +1080,6 @@ - Getting parsed runtime.Pattern from server mux [\#127](https://github.com/grpc-ecosystem/grpc-gateway/issues/127) - REST API without proxying [\#46](https://github.com/grpc-ecosystem/grpc-gateway/issues/46) -**Merged pull requests:** - -- Remove an obsolete custom option [\#604](https://github.com/grpc-ecosystem/grpc-gateway/pull/604) ([yugui](https://github.com/yugui)) -- Support user configurable header forwarding & context metadata [\#336](https://github.com/grpc-ecosystem/grpc-gateway/pull/336) ([tamalsaha](https://github.com/tamalsaha)) -- Update go\_out parameter to remove comma [\#333](https://github.com/grpc-ecosystem/grpc-gateway/pull/333) ([tmc](https://github.com/tmc)) -- Update stale path in README [\#332](https://github.com/grpc-ecosystem/grpc-gateway/pull/332) ([tmc](https://github.com/tmc)) -- improve documentation regarding external dependencies [\#330](https://github.com/grpc-ecosystem/grpc-gateway/pull/330) ([CaptTofu](https://github.com/CaptTofu)) -- Return an error on invalid nested query parameters. [\#329](https://github.com/grpc-ecosystem/grpc-gateway/pull/329) ([fische](https://github.com/fische)) -- Update upstream proto files and add google.golang.org/genproto support. [\#325](https://github.com/grpc-ecosystem/grpc-gateway/pull/325) ([tmc](https://github.com/tmc)) -- Support oneof fields in query params [\#321](https://github.com/grpc-ecosystem/grpc-gateway/pull/321) ([nilium](https://github.com/nilium)) -- Do not ignore the error coming from http.ListenAndServe in examples [\#319](https://github.com/grpc-ecosystem/grpc-gateway/pull/319) ([campoy](https://github.com/campoy)) -- Look up enum value maps by their proto name [\#315](https://github.com/grpc-ecosystem/grpc-gateway/pull/315) ([nilium](https://github.com/nilium)) -- enable parsing enums from query parameters [\#314](https://github.com/grpc-ecosystem/grpc-gateway/pull/314) ([tzneal](https://github.com/tzneal)) -- Do not add imports from methods with no bindings. [\#312](https://github.com/grpc-ecosystem/grpc-gateway/pull/312) ([fische](https://github.com/fische)) -- Convert the first letter of method name to upper [\#300](https://github.com/grpc-ecosystem/grpc-gateway/pull/300) ([lipixun](https://github.com/lipixun)) -- write query parameters to swagger definition [\#297](https://github.com/grpc-ecosystem/grpc-gateway/pull/297) ([t-yuki](https://github.com/t-yuki)) -- Bump swagger-client to 2.1.28 for examples/browser [\#290](https://github.com/grpc-ecosystem/grpc-gateway/pull/290) ([tmc](https://github.com/tmc)) -- pin to version before es6ism [\#289](https://github.com/grpc-ecosystem/grpc-gateway/pull/289) ([tmc](https://github.com/tmc)) -- Prevent lack of http bindings from generating non-building output [\#286](https://github.com/grpc-ecosystem/grpc-gateway/pull/286) ([tmc](https://github.com/tmc)) -- Added support for Timestamp in URL. [\#281](https://github.com/grpc-ecosystem/grpc-gateway/pull/281) ([johansja](https://github.com/johansja)) -- add plugin param 'allow\_delete\_body' [\#280](https://github.com/grpc-ecosystem/grpc-gateway/pull/280) ([msample](https://github.com/msample)) -- Fix ruby gen command [\#275](https://github.com/grpc-ecosystem/grpc-gateway/pull/275) ([bluehallu](https://github.com/bluehallu)) -- Make grpc-gateway support enum fields in path parameter [\#273](https://github.com/grpc-ecosystem/grpc-gateway/pull/273) ([linuxerwang](https://github.com/linuxerwang)) -- remove unnecessary make\(\) [\#271](https://github.com/grpc-ecosystem/grpc-gateway/pull/271) ([tmc](https://github.com/tmc)) -- preserve field order in swagger spec [\#270](https://github.com/grpc-ecosystem/grpc-gateway/pull/270) ([tmc](https://github.com/tmc)) -- Merge \#228 [\#268](https://github.com/grpc-ecosystem/grpc-gateway/pull/268) ([tmc](https://github.com/tmc)) -- Handle methods with no bindings more carefully [\#267](https://github.com/grpc-ecosystem/grpc-gateway/pull/267) ([tmc](https://github.com/tmc)) -- describe default marshaler in README.md [\#266](https://github.com/grpc-ecosystem/grpc-gateway/pull/266) ([tmc](https://github.com/tmc)) -- Add request\_context flag to utilize \(\*http.Request\).Context\(\) in handlers [\#265](https://github.com/grpc-ecosystem/grpc-gateway/pull/265) ([tmc](https://github.com/tmc)) -- Regenerate examples [\#264](https://github.com/grpc-ecosystem/grpc-gateway/pull/264) ([tmc](https://github.com/tmc)) -- Correct runtime.errorBody protobuf field tag [\#256](https://github.com/grpc-ecosystem/grpc-gateway/pull/256) ([tmc](https://github.com/tmc)) -- Pass permanent HTTP request headers [\#252](https://github.com/grpc-ecosystem/grpc-gateway/pull/252) ([tmc](https://github.com/tmc)) -- regenerate examples, fix tests for go tip [\#248](https://github.com/grpc-ecosystem/grpc-gateway/pull/248) ([tmc](https://github.com/tmc)) -- Render the swagger request body properly [\#247](https://github.com/grpc-ecosystem/grpc-gateway/pull/247) ([dprotaso](https://github.com/dprotaso)) -- Error output should have lowercase attribute names [\#244](https://github.com/grpc-ecosystem/grpc-gateway/pull/244) ([nathanborror](https://github.com/nathanborror)) -- runtime - export prefix constants [\#236](https://github.com/grpc-ecosystem/grpc-gateway/pull/236) ([philipithomas](https://github.com/philipithomas)) -- README - Add CoreOS example [\#231](https://github.com/grpc-ecosystem/grpc-gateway/pull/231) ([philipithomas](https://github.com/philipithomas)) -- Docs - Add section about how HTTP maps to gRPC [\#227](https://github.com/grpc-ecosystem/grpc-gateway/pull/227) ([philipithomas](https://github.com/philipithomas)) -- readme: added links to additional documentation [\#222](https://github.com/grpc-ecosystem/grpc-gateway/pull/222) ([sdemos](https://github.com/sdemos)) -- Use a released version of protoc [\#216](https://github.com/grpc-ecosystem/grpc-gateway/pull/216) ([yugui](https://github.com/yugui)) -- Add contribution guideline [\#210](https://github.com/grpc-ecosystem/grpc-gateway/pull/210) ([yugui](https://github.com/yugui)) -- Allowing unknown fields to be dropped instead of returning error from… [\#208](https://github.com/grpc-ecosystem/grpc-gateway/pull/208) ([sriniven](https://github.com/sriniven)) -- Avoid Internal Server Error on zero-length input for bidi streaming [\#200](https://github.com/grpc-ecosystem/grpc-gateway/pull/200) ([yugui](https://github.com/yugui)) - ## [v1.1.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.1.0) (2016-07-23) [Full Changelog](https://github.com/grpc-ecosystem/grpc-gateway/compare/v1.0.0...v1.1.0) @@ -1478,13 +1099,6 @@ - Ading grpc-timeout support [\#107](https://github.com/grpc-ecosystem/grpc-gateway/issues/107) - Generation of one swagger file out of multiple protos? [\#99](https://github.com/grpc-ecosystem/grpc-gateway/issues/99) -**Merged pull requests:** - -- Rename packages to follow the repository transfer [\#192](https://github.com/grpc-ecosystem/grpc-gateway/pull/192) ([yugui](https://github.com/yugui)) -- return err early if EOF to prevent logging in normal conditions [\#191](https://github.com/grpc-ecosystem/grpc-gateway/pull/191) ([tmc](https://github.com/tmc)) -- send Trailer header on error [\#188](https://github.com/grpc-ecosystem/grpc-gateway/pull/188) ([kazegusuri](https://github.com/kazegusuri)) -- generate swagger output for streaming endpoints with a basic note [\#183](https://github.com/grpc-ecosystem/grpc-gateway/pull/183) ([tmc](https://github.com/tmc)) - ## [v1.0.0](https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.0.0) (2016-06-15) **Implemented enhancements:** @@ -1494,8 +1108,6 @@ - Emit API definition in Swagger schema format [\#9](https://github.com/grpc-ecosystem/grpc-gateway/issues/9) - Method parameter in query string [\#6](https://github.com/grpc-ecosystem/grpc-gateway/issues/6) - Integrate authentication [\#4](https://github.com/grpc-ecosystem/grpc-gateway/issues/4) -- Add swagger support [\#68](https://github.com/grpc-ecosystem/grpc-gateway/pull/68) ([achew22](https://github.com/achew22)) -- Add runtime.WithForwardResponseOption [\#53](https://github.com/grpc-ecosystem/grpc-gateway/pull/53) ([bufdev](https://github.com/bufdev)) **Fixed bugs:** @@ -1544,103 +1156,6 @@ - google.api.http options in multi-line format not supported [\#16](https://github.com/grpc-ecosystem/grpc-gateway/issues/16) - Is there any plan to developing a C++ version? [\#15](https://github.com/grpc-ecosystem/grpc-gateway/issues/15) -**Merged pull requests:** -- Regenerate files with the latest protoc-gen-go [\#185](https://github.com/grpc-ecosystem/grpc-gateway/pull/185) ([yugui](https://github.com/yugui)) -- Add browser examples [\#184](https://github.com/grpc-ecosystem/grpc-gateway/pull/184) ([yugui](https://github.com/yugui)) -- Fix golint and go vet errors [\#182](https://github.com/grpc-ecosystem/grpc-gateway/pull/182) ([yugui](https://github.com/yugui)) -- Add integration with clients generated by swagger-codegen [\#181](https://github.com/grpc-ecosystem/grpc-gateway/pull/181) ([yugui](https://github.com/yugui)) -- Simplify example services [\#180](https://github.com/grpc-ecosystem/grpc-gateway/pull/180) ([yugui](https://github.com/yugui)) -- Avoid errors when req.RemoteAddr is empty [\#178](https://github.com/grpc-ecosystem/grpc-gateway/pull/178) ([yugui](https://github.com/yugui)) -- Feature/headers [\#176](https://github.com/grpc-ecosystem/grpc-gateway/pull/176) ([yugui](https://github.com/yugui)) -- Include HTTP req.remoteAddr in gRPC ctx [\#174](https://github.com/grpc-ecosystem/grpc-gateway/pull/174) ([mikeatlas](https://github.com/mikeatlas)) -- Update dependencies [\#171](https://github.com/grpc-ecosystem/grpc-gateway/pull/171) ([yugui](https://github.com/yugui)) -- Add bidirectional streaming support by running Send\(\) and Recv\(\) concurrently [\#170](https://github.com/grpc-ecosystem/grpc-gateway/pull/170) ([tmc](https://github.com/tmc)) -- make Authorization header check case-insensitive to comply with RFC 2616 4.2 [\#164](https://github.com/grpc-ecosystem/grpc-gateway/pull/164) ([tmc](https://github.com/tmc)) -- jsonpb: avoid duplicating upstream's struct [\#158](https://github.com/grpc-ecosystem/grpc-gateway/pull/158) ([tamird](https://github.com/tamird)) -- Generate Swagger description for service methods using proto comments. [\#156](https://github.com/grpc-ecosystem/grpc-gateway/pull/156) ([t-yuki](https://github.com/t-yuki)) -- Implement gRPC timeout support for inbound HTTP headers [\#155](https://github.com/grpc-ecosystem/grpc-gateway/pull/155) ([mwitkow](https://github.com/mwitkow)) -- Add more examples to marshalers [\#154](https://github.com/grpc-ecosystem/grpc-gateway/pull/154) ([yugui](https://github.com/yugui)) -- custom marshaler: handle `Accept` headers correctly [\#152](https://github.com/grpc-ecosystem/grpc-gateway/pull/152) ([tamird](https://github.com/tamird)) -- Simplify custom marshaler API [\#151](https://github.com/grpc-ecosystem/grpc-gateway/pull/151) ([yugui](https://github.com/yugui)) -- Fix camel case path parameter handling in swagger [\#149](https://github.com/grpc-ecosystem/grpc-gateway/pull/149) ([yugui](https://github.com/yugui)) -- Swagger dot in path template [\#148](https://github.com/grpc-ecosystem/grpc-gateway/pull/148) ([yugui](https://github.com/yugui)) -- Support map types in swagger generator [\#147](https://github.com/grpc-ecosystem/grpc-gateway/pull/147) ([yugui](https://github.com/yugui)) -- Cleanup custom marshaler [\#146](https://github.com/grpc-ecosystem/grpc-gateway/pull/146) ([yugui](https://github.com/yugui)) -- Implement custom Marshaler support, add jsonpb implemention. [\#144](https://github.com/grpc-ecosystem/grpc-gateway/pull/144) ([tmc](https://github.com/tmc)) -- Allow period in path URL templates when generating Swagger templates. [\#143](https://github.com/grpc-ecosystem/grpc-gateway/pull/143) ([ivucica](https://github.com/ivucica)) -- Link to LICENSE.txt [\#142](https://github.com/grpc-ecosystem/grpc-gateway/pull/142) ([sunkuet02](https://github.com/sunkuet02)) -- Support map types in swagger generator [\#141](https://github.com/grpc-ecosystem/grpc-gateway/pull/141) ([t-yuki](https://github.com/t-yuki)) -- Conditionally stops checking if generated file are up-to-date [\#136](https://github.com/grpc-ecosystem/grpc-gateway/pull/136) ([yugui](https://github.com/yugui)) -- Generate Swagger description for service methods using proto comments. [\#134](https://github.com/grpc-ecosystem/grpc-gateway/pull/134) ([ivucica](https://github.com/ivucica)) -- Swagger definitions now have `type` set to `object`. [\#133](https://github.com/grpc-ecosystem/grpc-gateway/pull/133) ([ivucica](https://github.com/ivucica)) -- go\_package option as go import path [\#129](https://github.com/grpc-ecosystem/grpc-gateway/pull/129) ([kazegusuri](https://github.com/kazegusuri)) -- Fix govet errors [\#126](https://github.com/grpc-ecosystem/grpc-gateway/pull/126) ([yugui](https://github.com/yugui)) -- Fix data-race in generated codes [\#125](https://github.com/grpc-ecosystem/grpc-gateway/pull/125) ([yugui](https://github.com/yugui)) -- Fix \#119 - CloseNotify race with ServeHTTP [\#120](https://github.com/grpc-ecosystem/grpc-gateway/pull/120) ([cuongdo](https://github.com/cuongdo)) -- Replace glog with grpclog [\#118](https://github.com/grpc-ecosystem/grpc-gateway/pull/118) ([cuongdo](https://github.com/cuongdo)) -- Fix a goroutine-leak in HTTP keep-alive [\#116](https://github.com/grpc-ecosystem/grpc-gateway/pull/116) ([yugui](https://github.com/yugui)) -- Fix camel case path parameter handling in swagger [\#114](https://github.com/grpc-ecosystem/grpc-gateway/pull/114) ([t-yuki](https://github.com/t-yuki)) -- gofmt -s [\#112](https://github.com/grpc-ecosystem/grpc-gateway/pull/112) ([shawnps](https://github.com/shawnps)) -- fix typo [\#111](https://github.com/grpc-ecosystem/grpc-gateway/pull/111) ([shawnps](https://github.com/shawnps)) -- fix typo [\#110](https://github.com/grpc-ecosystem/grpc-gateway/pull/110) ([shawnps](https://github.com/shawnps)) -- fixes missing swagger operation objects [\#109](https://github.com/grpc-ecosystem/grpc-gateway/pull/109) ([t-yuki](https://github.com/t-yuki)) -- Add parser and swagger support for enum, no gengateway yet [\#108](https://github.com/grpc-ecosystem/grpc-gateway/pull/108) ([t-yuki](https://github.com/t-yuki)) -- README: add protoc-gen-swagger too [\#105](https://github.com/grpc-ecosystem/grpc-gateway/pull/105) ([philips](https://github.com/philips)) -- README: Suggest go get -u by default. [\#104](https://github.com/grpc-ecosystem/grpc-gateway/pull/104) ([dmitshur](https://github.com/dmitshur)) -- Cancel context when HTTP connection is closed [\#102](https://github.com/grpc-ecosystem/grpc-gateway/pull/102) ([floridoo](https://github.com/floridoo)) -- wait test server up [\#100](https://github.com/grpc-ecosystem/grpc-gateway/pull/100) ([kazegusuri](https://github.com/kazegusuri)) -- Fix the swagger section of the README.md [\#98](https://github.com/grpc-ecosystem/grpc-gateway/pull/98) ([naibaf0](https://github.com/naibaf0)) -- Add documentation for using Swagger [\#97](https://github.com/grpc-ecosystem/grpc-gateway/pull/97) ([achew22](https://github.com/achew22)) -- Better compatibility to field names generated by protoc-gen-go [\#96](https://github.com/grpc-ecosystem/grpc-gateway/pull/96) ([yugui](https://github.com/yugui)) -- Update protoc from 3.0.0-beta1 to 3.0.0-beta2 [\#95](https://github.com/grpc-ecosystem/grpc-gateway/pull/95) ([yugui](https://github.com/yugui)) -- Better grpc error strings [\#94](https://github.com/grpc-ecosystem/grpc-gateway/pull/94) ([floridoo](https://github.com/floridoo)) -- make available header and trailer metadata [\#93](https://github.com/grpc-ecosystem/grpc-gateway/pull/93) ([kazegusuri](https://github.com/kazegusuri)) -- make grpc.DialOption configurable [\#89](https://github.com/grpc-ecosystem/grpc-gateway/pull/89) ([kazegusuri](https://github.com/kazegusuri)) -- Add request in error handlers [\#88](https://github.com/grpc-ecosystem/grpc-gateway/pull/88) ([daniellowtw](https://github.com/daniellowtw)) -- Improve PascalFromSnake behavior [\#85](https://github.com/grpc-ecosystem/grpc-gateway/pull/85) ([tmc](https://github.com/tmc)) -- Typo grcp -\> grpc [\#81](https://github.com/grpc-ecosystem/grpc-gateway/pull/81) ([daniellowtw](https://github.com/daniellowtw)) -- Add abstraction of code generator implementation [\#78](https://github.com/grpc-ecosystem/grpc-gateway/pull/78) ([yugui](https://github.com/yugui)) -- Support multivalue of metadata [\#77](https://github.com/grpc-ecosystem/grpc-gateway/pull/77) ([yugui](https://github.com/yugui)) -- Fix broken test [\#76](https://github.com/grpc-ecosystem/grpc-gateway/pull/76) ([yugui](https://github.com/yugui)) -- Added missing instruction line in README [\#75](https://github.com/grpc-ecosystem/grpc-gateway/pull/75) ([betrcode](https://github.com/betrcode)) -- Fix a complie error in generated go files [\#71](https://github.com/grpc-ecosystem/grpc-gateway/pull/71) ([yugui](https://github.com/yugui)) -- Update generated .pb.go files in third\_party [\#69](https://github.com/grpc-ecosystem/grpc-gateway/pull/69) ([bufdev](https://github.com/bufdev)) -- Bugfix/handling headers for `Authorization` and `Host` [\#65](https://github.com/grpc-ecosystem/grpc-gateway/pull/65) ([mwitkow](https://github.com/mwitkow)) -- Fix `error` field always in chunk response [\#64](https://github.com/grpc-ecosystem/grpc-gateway/pull/64) ([mwitkow](https://github.com/mwitkow)) -- Update .pb.go to latest version. [\#63](https://github.com/grpc-ecosystem/grpc-gateway/pull/63) ([johansja](https://github.com/johansja)) -- Run more tests in Travis CI [\#60](https://github.com/grpc-ecosystem/grpc-gateway/pull/60) ([yugui](https://github.com/yugui)) -- Added http error code and error status for responseStreamChunk error [\#59](https://github.com/grpc-ecosystem/grpc-gateway/pull/59) ([kdima](https://github.com/kdima)) -- Fix parsing of verb and final path component. [\#55](https://github.com/grpc-ecosystem/grpc-gateway/pull/55) ([hbchai](https://github.com/hbchai)) -- add grpc.WithInsecure\(\) as option for grpc.Dial call in template [\#52](https://github.com/grpc-ecosystem/grpc-gateway/pull/52) ([bufdev](https://github.com/bufdev)) -- update .pb.go files for latest golang proto generation [\#51](https://github.com/grpc-ecosystem/grpc-gateway/pull/51) ([bufdev](https://github.com/bufdev)) -- Fix a build error with the latest protoc-gen-go [\#50](https://github.com/grpc-ecosystem/grpc-gateway/pull/50) ([yugui](https://github.com/yugui)) -- Configure Travis CI [\#49](https://github.com/grpc-ecosystem/grpc-gateway/pull/49) ([yugui](https://github.com/yugui)) -- Follow a change of go package name convention in protoc-gen-go [\#48](https://github.com/grpc-ecosystem/grpc-gateway/pull/48) ([yugui](https://github.com/yugui)) -- Consider tail segments after deep wildcard [\#47](https://github.com/grpc-ecosystem/grpc-gateway/pull/47) ([yugui](https://github.com/yugui)) -- Fix typo in README [\#45](https://github.com/grpc-ecosystem/grpc-gateway/pull/45) ([jonboulle](https://github.com/jonboulle)) -- Fix undefined variable error in generated codes [\#42](https://github.com/grpc-ecosystem/grpc-gateway/pull/42) ([yugui](https://github.com/yugui)) -- Follow changes in protoc-gen-go and grpc-go [\#41](https://github.com/grpc-ecosystem/grpc-gateway/pull/41) ([yugui](https://github.com/yugui)) -- Fixes \#4 [\#40](https://github.com/grpc-ecosystem/grpc-gateway/pull/40) ([AmandaCameron](https://github.com/AmandaCameron)) -- fix examples to work with go1.5 [\#39](https://github.com/grpc-ecosystem/grpc-gateway/pull/39) ([tmc](https://github.com/tmc)) -- rename internal to utilties for 1.5 compatibility [\#38](https://github.com/grpc-ecosystem/grpc-gateway/pull/38) ([tmc](https://github.com/tmc)) -- Reflection fix of proto3 nested messages. [\#34](https://github.com/grpc-ecosystem/grpc-gateway/pull/34) ([mwitkow](https://github.com/mwitkow)) -- \[Experimental\] Make the response forwarder function customizable [\#31](https://github.com/grpc-ecosystem/grpc-gateway/pull/31) ([yugui](https://github.com/yugui)) -- Add f.Flush\(\) to runtime.ForwardResponseStream [\#30](https://github.com/grpc-ecosystem/grpc-gateway/pull/30) ([vvakame](https://github.com/vvakame)) -- Format error message in JSON [\#29](https://github.com/grpc-ecosystem/grpc-gateway/pull/29) ([yugui](https://github.com/yugui)) -- Update examples with HTTP header context annotation [\#28](https://github.com/grpc-ecosystem/grpc-gateway/pull/28) ([yugui](https://github.com/yugui)) -- Report semantic errors in the source to protoc [\#27](https://github.com/grpc-ecosystem/grpc-gateway/pull/27) ([yugui](https://github.com/yugui)) -- Add support for non-nullable nested messages. [\#21](https://github.com/grpc-ecosystem/grpc-gateway/pull/21) ([dmitshur](https://github.com/dmitshur)) -- Receive GRPC metadata from HTTP headers. [\#18](https://github.com/grpc-ecosystem/grpc-gateway/pull/18) ([crast](https://github.com/crast)) -- Implement detailed specs of google.api.http [\#14](https://github.com/grpc-ecosystem/grpc-gateway/pull/14) ([yugui](https://github.com/yugui)) -- Configure travis CI [\#13](https://github.com/grpc-ecosystem/grpc-gateway/pull/13) ([yugui](https://github.com/yugui)) -- Replace our own custom option with the one defined by Google [\#12](https://github.com/grpc-ecosystem/grpc-gateway/pull/12) ([yugui](https://github.com/yugui)) -- Remove useless context setup [\#11](https://github.com/grpc-ecosystem/grpc-gateway/pull/11) ([iamqizhao](https://github.com/iamqizhao)) -- Fix typo, path, missing semicolon. [\#10](https://github.com/grpc-ecosystem/grpc-gateway/pull/10) ([dmitshur](https://github.com/dmitshur)) -- Use a globally unique id for the custom option [\#3](https://github.com/grpc-ecosystem/grpc-gateway/pull/3) ([yugui](https://github.com/yugui)) -- implement ABitOfEverythingService [\#2](https://github.com/grpc-ecosystem/grpc-gateway/pull/2) ([mattn](https://github.com/mattn)) -- support streaming API calls [\#1](https://github.com/grpc-ecosystem/grpc-gateway/pull/1) ([yugui](https://github.com/yugui)) - - - -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* diff --git a/Makefile b/Makefile index b58a1d1c0a8..9a48617377e 100644 --- a/Makefile +++ b/Makefile @@ -4,70 +4,64 @@ # grpc-gateway itself. GO_PLUGIN=bin/protoc-gen-go -GO_PROTOBUF_REPO=github.com/golang/protobuf -GO_PLUGIN_PKG=$(GO_PROTOBUF_REPO)/protoc-gen-go -GO_PTYPES_ANY_PKG=$(GO_PROTOBUF_REPO)/ptypes/any -SWAGGER_PLUGIN=bin/protoc-gen-swagger -SWAGGER_PLUGIN_SRC= utilities/doc.go \ - utilities/pattern.go \ - utilities/trie.go \ - protoc-gen-swagger/genswagger/generator.go \ - protoc-gen-swagger/genswagger/template.go \ - protoc-gen-swagger/main.go -SWAGGER_PLUGIN_PKG=./protoc-gen-swagger +GO_PLUGIN_PKG=google.golang.org/protobuf/cmd/protoc-gen-go +GO_GRPC_PLUGIN=bin/protoc-gen-go-grpc +GO_GRPC_PLUGIN_PKG=google.golang.org/grpc/cmd/protoc-gen-go-grpc +OPENAPI_PLUGIN=bin/protoc-gen-openapiv2 +OPENAPI_PLUGIN_SRC= ./utilities/doc.go \ + ./utilities/pattern.go \ + ./utilities/trie.go \ + protoc-gen-openapiv2/internal/genopenapi/generator.go \ + protoc-gen-openapiv2/internal/genopenapi/template.go \ + protoc-gen-openapiv2/main.go +OPENAPI_PLUGIN_PKG=./protoc-gen-openapiv2 GATEWAY_PLUGIN=bin/protoc-gen-grpc-gateway GATEWAY_PLUGIN_PKG=./protoc-gen-grpc-gateway -GATEWAY_PLUGIN_SRC= utilities/doc.go \ - utilities/pattern.go \ - utilities/trie.go \ - protoc-gen-grpc-gateway \ - protoc-gen-grpc-gateway/descriptor \ - protoc-gen-grpc-gateway/descriptor/registry.go \ - protoc-gen-grpc-gateway/descriptor/services.go \ - protoc-gen-grpc-gateway/descriptor/types.go \ - protoc-gen-grpc-gateway/descriptor/grpc_api_configuration.go \ - protoc-gen-grpc-gateway/descriptor/grpc_api_service.go \ - protoc-gen-grpc-gateway/generator \ - protoc-gen-grpc-gateway/generator/generator.go \ - protoc-gen-grpc-gateway/internal/gengateway \ - protoc-gen-grpc-gateway/internal/gengateway/doc.go \ - protoc-gen-grpc-gateway/internal/gengateway/generator.go \ - protoc-gen-grpc-gateway/internal/gengateway/template.go \ - protoc-gen-grpc-gateway/httprule \ - protoc-gen-grpc-gateway/httprule/compile.go \ - protoc-gen-grpc-gateway/httprule/parse.go \ - protoc-gen-grpc-gateway/httprule/types.go \ - protoc-gen-grpc-gateway/main.go +GATEWAY_PLUGIN_SRC= ./utilities/doc.go \ + ./utilities/pattern.go \ + ./utilities/trie.go \ + ./internal/descriptor \ + ./internal/descriptor/registry.go \ + ./internal/descriptor/services.go \ + ./internal/descriptor/types.go \ + ./internal/descriptor/grpc_api_configuration.go \ + ./internal/generator \ + ./internal/generator/generator.go \ + protoc-gen-grpc-gateway \ + protoc-gen-grpc-gateway/internal/gengateway \ + protoc-gen-grpc-gateway/internal/gengateway/doc.go \ + protoc-gen-grpc-gateway/internal/gengateway/generator.go \ + protoc-gen-grpc-gateway/internal/gengateway/template.go \ + internal/httprule \ + internal/httprule/compile.go \ + internal/httprule/parse.go \ + internal/httprule/types.go \ + protoc-gen-grpc-gateway/main.go GATEWAY_PLUGIN_FLAGS?= -SWAGGER_PLUGIN_FLAGS?= +OPENAPI_PLUGIN_FLAGS?= GOOGLEAPIS_DIR=third_party/googleapis -OUTPUT_DIR=_output -RUNTIME_PROTO=internal/errors.proto -RUNTIME_GO=$(RUNTIME_PROTO:.proto=.pb.go) - -OPENAPIV2_PROTO=protoc-gen-swagger/options/openapiv2.proto protoc-gen-swagger/options/annotations.proto +OPENAPIV2_PROTO=protoc-gen-openapiv2/options/openapiv2.proto protoc-gen-openapiv2/options/annotations.proto OPENAPIV2_GO=$(OPENAPIV2_PROTO:.proto=.pb.go) -PKGMAP=Mgoogle/protobuf/field_mask.proto=google.golang.org/genproto/protobuf/field_mask,Mgoogle/protobuf/descriptor.proto=$(GO_PLUGIN_PKG)/descriptor,Mexamples/internal/proto/sub/message.proto=github.com/grpc-ecosystem/grpc-gateway/examples/internal/proto/sub ADDITIONAL_GW_FLAGS= ifneq "$(GATEWAY_PLUGIN_FLAGS)" "" ADDITIONAL_GW_FLAGS=,$(GATEWAY_PLUGIN_FLAGS) endif ADDITIONAL_SWG_FLAGS= -ifneq "$(SWAGGER_PLUGIN_FLAGS)" "" - ADDITIONAL_SWG_FLAGS=,$(SWAGGER_PLUGIN_FLAGS) +ifneq "$(OPENAPI_PLUGIN_FLAGS)" "" + ADDITIONAL_SWG_FLAGS=,$(OPENAPI_PLUGIN_FLAGS) endif -SWAGGER_EXAMPLES=examples/internal/proto/examplepb/echo_service.proto \ +OPENAPI_EXAMPLES=examples/internal/proto/examplepb/echo_service.proto \ examples/internal/proto/examplepb/a_bit_of_everything.proto \ examples/internal/proto/examplepb/wrappers.proto \ examples/internal/proto/examplepb/stream.proto \ examples/internal/proto/examplepb/unannotated_echo_service.proto \ examples/internal/proto/examplepb/use_go_template.proto \ examples/internal/proto/examplepb/response_body_service.proto -SWAGGER_EXAMPLE_MERGE=examples/internal/proto/examplepb/swagger_merge_a.proto \ - examples/internal/proto/examplepb/swagger_merge_b.proto +OPENAPIMERGE_EXAMPLES=examples/internal/proto/examplepb/openapi_merge_a.proto \ + examples/internal/proto/examplepb/openapi_merge_b.proto EXAMPLES=examples/internal/proto/examplepb/echo_service.proto \ examples/internal/proto/examplepb/a_bit_of_everything.proto \ @@ -79,27 +73,35 @@ EXAMPLES=examples/internal/proto/examplepb/echo_service.proto \ examples/internal/proto/examplepb/use_go_template.proto \ examples/internal/proto/examplepb/response_body_service.proto +STANDALONE_EXAMPLES=examples/internal/proto/examplepb/unannotated_echo_service.proto GENERATE_UNBOUND_METHODS_EXAMPLE=examples/internal/proto/examplepb/generate_unbound_methods.proto HELLOWORLD=examples/internal/helloworld/helloworld.proto EXAMPLE_SVCSRCS=$(EXAMPLES:.proto=.pb.go) EXAMPLE_GWSRCS=$(EXAMPLES:.proto=.pb.gw.go) -EXAMPLE_SWAGGERSRCS=$(SWAGGER_EXAMPLES:.proto=.swagger.json) -EXAMPLE_SWAGGER_MERGE=examples/internal/proto/examplepb/swagger_merge.swagger.json +EXAMPLE_OPENAPISRCS=$(OPENAPI_EXAMPLES:.proto=.swagger.json) +EXAMPLE_OPENAPIMERGESRCS=examples/internal/proto/examplepb/openapi_merge.swagger.json EXAMPLE_DEPS=examples/internal/proto/pathenum/path_enum.proto examples/internal/proto/sub/message.proto examples/internal/proto/sub2/message.proto EXAMPLE_DEPSRCS=$(EXAMPLE_DEPS:.proto=.pb.go) -GENERATE_UNBOUND_METHODS_EXAMPLE_SWAGGERSRCS=$(GENERATE_UNBOUND_METHODS_EXAMPLE:.proto=.swagger.json) +GENERATE_UNBOUND_METHODS_EXAMPLE_OPENAPISRCS=$(GENERATE_UNBOUND_METHODS_EXAMPLE:.proto=.swagger.json) GENERATE_UNBOUND_METHODS_EXAMPLE_SVCSRCS=$(GENERATE_UNBOUND_METHODS_EXAMPLE:.proto=.pb.go) GENERATE_UNBOUND_METHODS_EXAMPLE_GWSRCS=$(GENERATE_UNBOUND_METHODS_EXAMPLE:.proto=.pb.gw.go) HELLOWORLD_SVCSRCS=$(HELLOWORLD:.proto=.pb.go) HELLOWORLD_GWSRCS=$(HELLOWORLD:.proto=.pb.gw.go) -RUNTIME_TEST_PROTO=runtime/internal/examplepb/example.proto +RUNTIME_TEST_PROTO=runtime/internal/examplepb/example.proto \ + runtime/internal/examplepb/proto2.proto \ + runtime/internal/examplepb/proto3.proto \ + runtime/internal/examplepb/non_standard_names.proto RUNTIME_TEST_SRCS=$(RUNTIME_TEST_PROTO:.proto=.pb.go) +APICONFIG_PROTO=internal/descriptor/apiconfig/apiconfig.proto \ + internal/descriptor/openapiconfig/openapiconfig.proto +APICONFIG_SRCS=$(APICONFIG_PROTO:.proto=.pb.go) + EXAMPLE_CLIENT_DIR=examples/internal/clients ECHO_EXAMPLE_SPEC=examples/internal/proto/examplepb/echo_service.swagger.json ECHO_EXAMPLE_SRCS=$(EXAMPLE_CLIENT_DIR)/echo/client.go \ @@ -154,77 +156,81 @@ SWAGGER_CODEGEN=swagger-codegen PROTOC_INC_PATH=$(dir $(shell which protoc))/../include -generate: $(RUNTIME_GO) - .SUFFIXES: .go .proto $(GO_PLUGIN): go build -o $(GO_PLUGIN) $(GO_PLUGIN_PKG) -$(RUNTIME_GO): $(RUNTIME_PROTO) $(GO_PLUGIN) - protoc -I $(PROTOC_INC_PATH) --plugin=$(GO_PLUGIN) -I. --go_out=$(PKGMAP),paths=source_relative:. $(RUNTIME_PROTO) +$(GO_GRPC_PLUGIN): + go build -o $(GO_GRPC_PLUGIN) $(GO_GRPC_PLUGIN_PKG) $(OPENAPIV2_GO): $(OPENAPIV2_PROTO) $(GO_PLUGIN) - protoc -I $(PROTOC_INC_PATH) --plugin=$(GO_PLUGIN) -I. --go_out=$(PKGMAP),paths=source_relative:. $(OPENAPIV2_PROTO) + protoc -I $(PROTOC_INC_PATH) --plugin=$(GO_PLUGIN) -I. --go_out=paths=source_relative:. $(OPENAPIV2_PROTO) -$(GATEWAY_PLUGIN): $(RUNTIME_GO) $(GATEWAY_PLUGIN_SRC) +$(GATEWAY_PLUGIN): $(GATEWAY_PLUGIN_SRC) $(OPENAPIV2_GO) go build -o $@ $(GATEWAY_PLUGIN_PKG) -$(SWAGGER_PLUGIN): $(SWAGGER_PLUGIN_SRC) $(OPENAPIV2_GO) - go build -o $@ $(SWAGGER_PLUGIN_PKG) +$(OPENAPI_PLUGIN): $(OPENAPI_PLUGIN_SRC) $(OPENAPIV2_GO) + go build -o $@ $(OPENAPI_PLUGIN_PKG) -$(EXAMPLE_SVCSRCS): $(GO_PLUGIN) $(EXAMPLES) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --go_out=$(PKGMAP),plugins=grpc,paths=source_relative:. $(EXAMPLES) -$(EXAMPLE_DEPSRCS): $(GO_PLUGIN) $(EXAMPLE_DEPS) - protoc -I $(PROTOC_INC_PATH) -I. --plugin=$(GO_PLUGIN) --go_out=$(PKGMAP),plugins=grpc,paths=source_relative:. $(@:.pb.go=.proto) +$(EXAMPLE_SVCSRCS): $(GO_PLUGIN) $(GO_GRPC_PLUGIN) $(EXAMPLES) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --plugin=$(GO_GRPC_PLUGIN) --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative,require_unimplemented_servers=false:. $(EXAMPLES) +$(EXAMPLE_DEPSRCS): $(GO_PLUGIN) $(GO_GRPC_PLUGIN) $(EXAMPLE_DEPS) + protoc -I $(PROTOC_INC_PATH) -I. --plugin=$(GO_PLUGIN) --plugin=$(GO_GRPC_PLUGIN) --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative,require_unimplemented_servers=false:. $(@:.pb.go=.proto) -$(RUNTIME_TEST_SRCS): $(GO_PLUGIN) $(RUNTIME_TEST_PROTO) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --go_out=$(PKGMAP),plugins=grpc,paths=source_relative:. $(RUNTIME_TEST_PROTO) +$(RUNTIME_TEST_SRCS): $(GO_PLUGIN) $(GO_GRPC_PLUGIN) $(RUNTIME_TEST_PROTO) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --plugin=$(GO_GRPC_PLUGIN) --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative,require_unimplemented_servers=false:. $(RUNTIME_TEST_PROTO) + +$(APICONFIG_SRCS): $(GO_PLUGIN) $(APICONFIG_PROTO) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --go_out=paths=source_relative:. $(APICONFIG_PROTO) $(EXAMPLE_GWSRCS): ADDITIONAL_GW_FLAGS:=$(ADDITIONAL_GW_FLAGS),grpc_api_configuration=examples/internal/proto/examplepb/unannotated_echo_service.yaml +$(EXAMPLE_GWSRCS): ADDITIONAL_SA_FLAGS:=,standalone=true,grpc_api_configuration=examples/internal/proto/examplepb/standalone_echo_service.yaml $(EXAMPLE_GWSRCS): $(GATEWAY_PLUGIN) $(EXAMPLES) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GATEWAY_PLUGIN) --grpc-gateway_out=logtostderr=true,allow_repeated_fields_in_body=true,$(PKGMAP)$(ADDITIONAL_GW_FLAGS):. $(EXAMPLES) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GATEWAY_PLUGIN) --grpc-gateway_out=logtostderr=true,allow_repeated_fields_in_body=true,paths=source_relative$(ADDITIONAL_SA_FLAGS):. $(STANDALONE_EXAMPLES) + mv examples/internal/proto/examplepb/unannotated_echo_service.pb.gw.go examples/internal/proto/standalone/ + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GATEWAY_PLUGIN) --grpc-gateway_out=logtostderr=true,allow_repeated_fields_in_body=true,paths=source_relative$(ADDITIONAL_GW_FLAGS):. $(EXAMPLES) + -$(EXAMPLE_SWAGGERSRCS): ADDITIONAL_SWG_FLAGS:=$(ADDITIONAL_SWG_FLAGS),grpc_api_configuration=examples/internal/proto/examplepb/unannotated_echo_service.yaml -$(EXAMPLE_SWAGGERSRCS): $(SWAGGER_PLUGIN) $(SWAGGER_EXAMPLES) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(SWAGGER_PLUGIN) --swagger_out=logtostderr=true,allow_repeated_fields_in_body=true,use_go_templates=true,$(PKGMAP)$(ADDITIONAL_SWG_FLAGS):. $(SWAGGER_EXAMPLES) +$(EXAMPLE_OPENAPISRCS): ADDITIONAL_SWG_FLAGS:=$(ADDITIONAL_SWG_FLAGS),grpc_api_configuration=examples/internal/proto/examplepb/unannotated_echo_service.yaml,openapi_configuration=examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml +$(EXAMPLE_OPENAPISRCS): $(OPENAPI_PLUGIN) $(OPENAPI_EXAMPLES) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(OPENAPI_PLUGIN) --openapiv2_out=logtostderr=true,allow_repeated_fields_in_body=true,use_go_templates=true$(ADDITIONAL_SWG_FLAGS):. $(OPENAPI_EXAMPLES) -$(EXAMPLE_SWAGGER_MERGE): $(SWAGGER_PLUGIN) $(SWAGGER_EXAMPLE_MERGE) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(SWAGGER_PLUGIN) --swagger_out=logtostderr=true,allow_repeated_fields_in_body=true,use_go_templates=true,allow_merge=true,merge_file_name=$(EXAMPLE_SWAGGER_MERGE:.swagger.json=),$(PKGMAP):. $(SWAGGER_EXAMPLE_MERGE) +$(EXAMPLE_OPENAPIMERGESRCS): $(OPENAPI_PLUGIN) $(OPENAPIMERGE_EXAMPLES) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(OPENAPI_PLUGIN) --openapiv2_out=logtostderr=true,allow_repeated_fields_in_body=true,use_go_templates=true,allow_merge=true,merge_file_name=$(EXAMPLE_OPENAPIMERGESRCS:.swagger.json=):. $(OPENAPIMERGE_EXAMPLES) $(GENERATE_UNBOUND_METHODS_EXAMPLE_GWSRCS): $(GATEWAY_PLUGIN) $(GENERATE_UNBOUND_METHODS_EXAMPLE) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GATEWAY_PLUGIN) --grpc-gateway_out=logtostderr=true,allow_repeated_fields_in_body=true,generate_unbound_methods=true,$(PKGMAP)$(ADDITIONAL_GW_FLAGS):. $(GENERATE_UNBOUND_METHODS_EXAMPLE) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GATEWAY_PLUGIN) --grpc-gateway_out=logtostderr=true,paths=source_relative,allow_repeated_fields_in_body=true,generate_unbound_methods=true$(ADDITIONAL_GW_FLAGS):. $(GENERATE_UNBOUND_METHODS_EXAMPLE) $(GENERATE_UNBOUND_METHODS_EXAMPLE_SVCSRCS): $(GO_PLUGIN) $(GENERATE_UNBOUND_METHODS_EXAMPLE) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --go_out=$(PKGMAP),plugins=grpc,paths=source_relative:. $(GENERATE_UNBOUND_METHODS_EXAMPLE) -$(GENERATE_UNBOUND_METHODS_EXAMPLE_SWAGGERSRCS): $(SWAGGER_PLUGIN) $(GENERATE_UNBOUND_METHODS_EXAMPLE) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(SWAGGER_PLUGIN) --swagger_out=logtostderr=true,allow_repeated_fields_in_body=true,use_go_templates=true,generate_unbound_methods=true,$(PKGMAP):. $(GENERATE_UNBOUND_METHODS_EXAMPLE) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --plugin=$(GO_GRPC_PLUGIN) --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative,require_unimplemented_servers=false:. $(GENERATE_UNBOUND_METHODS_EXAMPLE) +$(GENERATE_UNBOUND_METHODS_EXAMPLE_OPENAPISRCS): $(OPENAPI_PLUGIN) $(GENERATE_UNBOUND_METHODS_EXAMPLE) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(OPENAPI_PLUGIN) --openapiv2_out=logtostderr=true,allow_repeated_fields_in_body=true,use_go_templates=true,generate_unbound_methods=true:. $(GENERATE_UNBOUND_METHODS_EXAMPLE) -$(HELLOWORLD_SVCSRCS): $(GO_PLUGIN) $(HELLOWORLD) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --go_out=$(PKGMAP),plugins=grpc,paths=source_relative:. $(HELLOWORLD) +$(HELLOWORLD_SVCSRCS): $(GO_PLUGIN) $(GO_GRPC_PLUGIN) $(HELLOWORLD) + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GO_PLUGIN) --plugin=$(GO_GRPC_PLUGIN) --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative,require_unimplemented_servers=false:. $(HELLOWORLD) $(HELLOWORLD_GWSRCS): $(HELLOWORLD_GWSRCS): $(GATEWAY_PLUGIN) $(HELLOWORLD) - protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GATEWAY_PLUGIN) --grpc-gateway_out=logtostderr=true,allow_repeated_fields_in_body=true,$(PKGMAP)$(ADDITIONAL_GW_FLAGS):. $(HELLOWORLD) - + protoc -I $(PROTOC_INC_PATH) -I. -I$(GOOGLEAPIS_DIR) --plugin=$(GATEWAY_PLUGIN) --grpc-gateway_out=logtostderr=true,allow_repeated_fields_in_body=true,paths=source_relative$(ADDITIONAL_GW_FLAGS):. $(HELLOWORLD) $(ECHO_EXAMPLE_SRCS): $(ECHO_EXAMPLE_SPEC) $(SWAGGER_CODEGEN) generate -i $(ECHO_EXAMPLE_SPEC) \ - -l go -o examples/internal/clients/echo --additional-properties packageName=echo + -l go -o examples/internal/clients/echo --additional-properties packageName=echo @rm -f $(EXAMPLE_CLIENT_DIR)/echo/README.md \ $(EXAMPLE_CLIENT_DIR)/echo/git_push.sh $(ABE_EXAMPLE_SRCS): $(ABE_EXAMPLE_SPEC) $(SWAGGER_CODEGEN) generate -i $(ABE_EXAMPLE_SPEC) \ - -l go -o examples/internal/clients/abe --additional-properties packageName=abe + -l go -o examples/internal/clients/abe --additional-properties packageName=abe @rm -f $(EXAMPLE_CLIENT_DIR)/abe/README.md \ $(EXAMPLE_CLIENT_DIR)/abe/git_push.sh $(UNANNOTATED_ECHO_EXAMPLE_SRCS): $(UNANNOTATED_ECHO_EXAMPLE_SPEC) $(SWAGGER_CODEGEN) generate -i $(UNANNOTATED_ECHO_EXAMPLE_SPEC) \ - -l go -o examples/internal/clients/unannotatedecho --additional-properties packageName=unannotatedecho + -l go -o examples/internal/clients/unannotatedecho --additional-properties packageName=unannotatedecho @rm -f $(EXAMPLE_CLIENT_DIR)/unannotatedecho/README.md \ $(EXAMPLE_CLIENT_DIR)/unannotatedecho/git_push.sh $(RESPONSE_BODY_EXAMPLE_SRCS): $(RESPONSE_BODY_EXAMPLE_SPEC) $(SWAGGER_CODEGEN) generate -i $(RESPONSE_BODY_EXAMPLE_SPEC) \ - -l go -o examples/internal/clients/responsebody --additional-properties packageName=responsebody + -l go -o examples/internal/clients/responsebody --additional-properties packageName=responsebody @rm -f $(EXAMPLE_CLIENT_DIR)/responsebody/README.md \ $(EXAMPLE_CLIENT_DIR)/responsebody/git_push.sh $(GENERATE_UNBOUND_METHODS_EXAMPLE_SRCS): $(GENERATE_UNBOUND_METHODS_EXAMPLE_SPEC) @@ -233,8 +239,8 @@ $(GENERATE_UNBOUND_METHODS_EXAMPLE_SRCS): $(GENERATE_UNBOUND_METHODS_EXAMPLE_SPE @rm -f $(EXAMPLE_CLIENT_DIR)/generateunboundmethods/README.md \ $(EXAMPLE_CLIENT_DIR)/generateunboundmethods/git_push.sh -examples: $(EXAMPLE_DEPSRCS) $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_SWAGGERSRCS) $(EXAMPLE_SWAGGER_MERGE) $(EXAMPLE_CLIENT_SRCS) $(HELLOWORLD_SVCSRCS) $(HELLOWORLD_GWSRCS) $(GENERATE_UNBOUND_METHODS_EXAMPLE_GWSRCS) $(GENERATE_UNBOUND_METHODS_EXAMPLE_SVCSRCS) $(GENERATE_UNBOUND_METHODS_EXAMPLE_SWAGGERSRCS) -testproto: $(RUNTIME_TEST_SRCS) +examples: $(EXAMPLE_DEPSRCS) $(EXAMPLE_SVCSRCS) $(EXAMPLE_GWSRCS) $(EXAMPLE_OPENAPISRCS) $(EXAMPLE_OPENAPIMERGESRCS) $(EXAMPLE_CLIENT_SRCS) $(HELLOWORLD_SVCSRCS) $(HELLOWORLD_GWSRCS) $(GENERATE_UNBOUND_METHODS_EXAMPLE_GWSRCS) $(GENERATE_UNBOUND_METHODS_EXAMPLE_SVCSRCS) $(GENERATE_UNBOUND_METHODS_EXAMPLE_OPENAPISRCS) +testproto: $(RUNTIME_TEST_SRCS) $(APICONFIG_SRCS) test: examples testproto go test -short -race ./... go test -race ./examples/internal/integration -args -network=unix -endpoint=test.sock @@ -251,30 +257,21 @@ changelog: --compare-link \ --github-site=https://github.com \ --unreleased-label "**Next release**" \ - --release-branch=master \ - --future-release=v1.15.0 -lint: - golint --set_exit_status ./runtime - golint --set_exit_status ./utilities/... - golint --set_exit_status ./protoc-gen-grpc-gateway/... - golint --set_exit_status ./protoc-gen-swagger/... - go vet ./runtime || true - go vet ./utilities/... - go vet ./protoc-gen-grpc-gateway/... - go vet ./protoc-gen-swagger/... + --release-branch=v2 \ + --future-release=v2.0.0-beta.5 clean: - rm -f $(GATEWAY_PLUGIN) $(SWAGGER_PLUGIN) + rm -f $(GATEWAY_PLUGIN) $(OPENAPI_PLUGIN) distclean: clean rm -f $(GO_PLUGIN) realclean: distclean rm -f $(EXAMPLE_SVCSRCS) $(EXAMPLE_DEPSRCS) rm -f $(EXAMPLE_GWSRCS) - rm -f $(EXAMPLE_SWAGGERSRCS) + rm -f $(EXAMPLE_OPENAPISRCS) rm -f $(EXAMPLE_CLIENT_SRCS) rm -f $(GENERATE_UNBOUND_METHODS_EXAMPLE_GWSRCS) rm -f $(GENERATE_UNBOUND_METHODS_EXAMPLE_SVCSRCS) - rm -f $(GENERATE_UNBOUND_METHODS_EXAMPLE_SWAGGERSRCS) + rm -f $(GENERATE_UNBOUND_METHODS_EXAMPLE_OPENAPISRCS) rm -f $(HELLOWORLD_SVCSRCS) rm -f $(HELLOWORLD_GWSRCS) rm -f $(OPENAPIV2_GO) diff --git a/README.md b/README.md index 29dd79a25f6..93c6d8aaa3e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # grpc-gateway -[![release](https://img.shields.io/github/release/grpc-ecosystem/grpc-gateway.svg?style=flat-square)](https://github.com/grpc-ecosystem/grpc-gateway/releases) -[![CircleCI](https://img.shields.io/circleci/project/github/grpc-ecosystem/grpc-gateway/master.svg?style=flat-square)](https://circleci.com/gh/grpc-ecosystem/grpc-gateway) -[![coverage](https://img.shields.io/codecov/c/github/grpc-ecosystem/grpc-gateway/master.svg?style=flat-square)](https://codecov.io/gh/grpc-ecosystem/grpc-gateway) +[![release](https://img.shields.io/github/v/release/grpc-ecosystem/grpc-gateway?include_prereleases&sort=semver&style=flat-square)](https://github.com/grpc-ecosystem/grpc-gateway/releases) +[![CircleCI](https://img.shields.io/circleci/project/github/grpc-ecosystem/grpc-gateway/v2.svg?style=flat-square)](https://circleci.com/gh/grpc-ecosystem/grpc-gateway/tree/v2) +[![coverage](https://img.shields.io/codecov/c/github/grpc-ecosystem/grpc-gateway/v2.svg?style=flat-square)](https://codecov.io/gh/grpc-ecosystem/grpc-gateway) [![license](https://img.shields.io/github/license/grpc-ecosystem/grpc-gateway.svg?style=flat-square)](LICENSE.txt) [![Slack](https://img.shields.io/badge/slack-%23grpc--gateway-brightgreen?style=flat-square)](https://join.slack.com/t/gophers/shared_invite/zt-gmw97q11-1OWgj2Dqsc13eqoSPwvNDQ) @@ -60,8 +60,8 @@ to track the versions of the following executable packages: package tools import ( - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" - _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" + _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2" _ "github.com/golang/protobuf/protoc-gen-go" ) ``` @@ -70,15 +70,15 @@ Run `go mod tidy` to resolve the versions. Install by running ```sh $ go install \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \ - github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \ + github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \ + github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \ github.com/golang/protobuf/protoc-gen-go ``` This will place three binaries in your `$GOBIN`; * `protoc-gen-grpc-gateway` -* `protoc-gen-swagger` +* `protoc-gen-openapiv2` * `protoc-gen-go` Make sure that your `$GOBIN` is in your `$PATH`. @@ -89,15 +89,16 @@ Make sure that your `$GOBIN` is in your `$PATH`. `your_service.proto`: ```protobuf - syntax = "proto3"; - package example; - message StringMessage { - string value = 1; - } + syntax = "proto3"; + package your.service.v1; + option go_package = "github.com/yourorg/yourprotos/gen/go/your/service/v1"; + message StringMessage { + string value = 1; + } - service YourService { - rpc Echo(StringMessage) returns (StringMessage) {} - } + service YourService { + rpc Echo(StringMessage) returns (StringMessage) {} + } ``` 2. Generate gRPC stubs @@ -158,7 +159,8 @@ Make sure that your `$GOBIN` is in your `$PATH`. `your_service.proto`: ```diff syntax = "proto3"; - package example; + package your.service.v1; + option go_package = "github.com/yourorg/yourprotos/gen/go/your/service/v1"; + +import "google/api/annotations.proto"; + @@ -176,6 +178,11 @@ Make sure that your `$GOBIN` is in your `$PATH`. + } } ``` + >You will need to provide the required third party protobuf files to the `protoc` compiler. + >They are included in this repo under the `third_party/googleapis` folder, and we recommend copying + >them into your `protoc` generation file structure. If you've structured your proto files according + >to something like [the Buf style guide](https://buf.build/docs/style-guide#files-and-packages), + >you could copy the files into a top-level `./google` folder. >You will need to provide the required third party protobuf files to the `protoc` compiler. >They are included in this repo under the `third_party/googleapis` folder, and we recommend copying @@ -185,7 +192,7 @@ Make sure that your `$GOBIN` is in your `$PATH`. See [a_bit_of_everything.proto](examples/internal/proto/examplepb/a_bit_of_everything.proto) for examples of more annotations you can add to customize gateway behavior - and generated Swagger output. + and generated OpenAPI output. Here's what a `protoc` execution might look like: @@ -224,9 +231,9 @@ Make sure that your `$GOBIN` is in your `$PATH`. "net/http" "github.com/golang/glog" - "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc" - + gw "github.com/yourorg/yourrepo/proto/gen/go/your/service/v1/your_service" // Update ) @@ -264,10 +271,10 @@ Make sure that your `$GOBIN` is in your `$PATH`. } ``` -6. (Optional) Generate swagger definitions using `protoc-gen-swagger` +6. (Optional) Generate OpenAPI definitions using `protoc-gen-openapiv2` ```sh - protoc -I . --swagger_out ./gen/swagger --swagger_opt logtostderr=true your/service/v1/your_service.proto + protoc -I . --openapiv2_out ./gen/openapiv2 --openapiv2_opt logtostderr=true your/service/v1/your_service.proto ``` Note that this plugin also supports generating swagger definitions for unannotated methods; use the `generate_unbound_methods` option to enable this. @@ -290,7 +297,19 @@ through protoc using one of 2 patterns: ```sh --grpc-gateway_out=logtostderr=true,repeated_path_param_separator=ssv:. ---swagger_out=logtostderr=true,repeated_path_param_separator=ssv:. +--openapiv2_out=logtostderr=true,repeated_path_param_separator=ssv:. +``` + +* using additional `--_opt` parameters: `--_opt=[,]*` + +```sh +--grpc-gateway_opt logtostderr=true,repeated_path_param_separator=ssv +# or separately +--grpc-gateway_opt logtostderr=true --grpc-gateway_opt repeated_path_param_separator=ssv + +--openapiv2_opt logtostderr=true,repeated_path_param_separator=ssv +# or separately +--openapiv2_opt logtostderr=true --openapiv2_opt repeated_path_param_separator=ssv ``` * using additional `--_opt` parameters: `--_opt=[,]*` @@ -317,12 +336,12 @@ useful to pass the request-scoped context between the gateway and the gRPC servi logging. You can give these flags together with parameters above. Run `protoc-gen-grpc-gateway --help` for more details about the flags. -Similarly, `protoc-gen-swagger` supports command-line flags to control Swagger +Similarly, `protoc-gen-openapiv2` supports command-line flags to control OpenAPI output (for example, `json_names_for_fields` to output JSON names for fields -instead of protobuf names). Run `protoc-gen-swagger --help` for more flag -details. Further Swagger customization is possible by annotating your `.proto` +instead of protobuf names). Run `protoc-gen-openapiv2 --help` for more flag +details. Further OpenAPI customization is possible by annotating your `.proto` files with options from -[openapiv2.proto](protoc-gen-swagger/options/openapiv2.proto) - see +[openapiv2.proto](protoc-gen-openapiv2/options/openapiv2.proto) - see [a_bit_of_everything.proto](examples/internal/proto/examplepb/a_bit_of_everything.proto) for examples. diff --git a/WORKSPACE b/WORKSPACE index ad754938b55..11f25c23d26 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -33,10 +33,10 @@ rules_proto_toolchains() http_archive( name = "io_bazel_rules_go", - sha256 = "7b9bbe3ea1fccb46dcfa6c3f3e29ba7ec740d8733370e21cdc8937467b4a4349", + sha256 = "b725e6497741d7fc2d55fcc29a276627d10e43fa5d0bb692692890ae30d98d00", urls = [ - "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.22.4/rules_go-v0.22.4.tar.gz", - "https://github.com/bazelbuild/rules_go/releases/download/v0.22.4/rules_go-v0.22.4.tar.gz", + "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/v0.24.3/rules_go-v0.24.3.tar.gz", + "https://github.com/bazelbuild/rules_go/releases/download/v0.24.3/rules_go-v0.24.3.tar.gz", ], ) diff --git a/bin/.gitignore b/bin/.gitignore index f20d08cf066..f56721fd9bd 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,3 +1,4 @@ /protoc-gen-go +/protoc-gen-go-grpc /protoc-gen-grpc-gateway -/protoc-gen-swagger +/protoc-gen-openapiv2 diff --git a/codegenerator/BUILD.bazel b/codegenerator/BUILD.bazel deleted file mode 100644 index 5c8ae566cd6..00000000000 --- a/codegenerator/BUILD.bazel +++ /dev/null @@ -1,26 +0,0 @@ -load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") - -package(default_visibility = ["//visibility:public"]) - -go_library( - name = "go_default_library", - srcs = [ - "doc.go", - "parse_req.go", - ], - importpath = "github.com/grpc-ecosystem/grpc-gateway/codegenerator", - deps = [ - "@com_github_golang_protobuf//proto:go_default_library", - "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", - ], -) - -go_test( - name = "go_default_test", - srcs = ["parse_req_test.go"], - embed = [":go_default_library"], - deps = [ - "@com_github_golang_protobuf//proto:go_default_library", - "@io_bazel_rules_go//proto/wkt:compiler_plugin_go_proto", - ], -) diff --git a/docs/Gemfile b/docs/Gemfile index 6557533bd8f..53127f6ad4a 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -1,9 +1,9 @@ source 'https://rubygems.org' group :development, :test do - gem 'github-pages', '~> 207' + gem 'github-pages', '~> 209' gem 'jekyll', '~> 3.9.0' - gem 'jekyll-redirect-from', '~> 0.15.0' + gem 'jekyll-redirect-from', '~> 0.16.0' gem 'jekyll-sitemap', '~> 1.4.0' gem 'jekyll-toc', '~> 0.5.1' end diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 31e0d420387..e8e31534074 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - activesupport (6.0.3.2) + activesupport (6.0.3.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -19,7 +19,7 @@ GEM concurrent-ruby (1.1.7) dnsruby (1.61.4) simpleidn (~> 0.1) - em-websocket (0.5.1) + em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) ethon (0.12.0) @@ -31,23 +31,23 @@ GEM ffi (1.13.1) forwardable-extended (2.6.0) gemoji (3.0.1) - github-pages (207) + github-pages (209) github-pages-health-check (= 1.16.1) jekyll (= 3.9.0) jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) jekyll-commonmark-ghpages (= 0.1.6) jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.13.0) + jekyll-feed (= 0.15.1) jekyll-gist (= 1.5.0) jekyll-github-metadata (= 2.13.0) - jekyll-mentions (= 1.5.1) + jekyll-mentions (= 1.6.0) jekyll-optional-front-matter (= 0.3.2) jekyll-paginate (= 1.1.0) jekyll-readme-index (= 0.3.0) - jekyll-redirect-from (= 0.15.0) + jekyll-redirect-from (= 0.16.0) jekyll-relative-links (= 0.6.1) - jekyll-remote-theme (= 0.4.1) + jekyll-remote-theme (= 0.4.2) jekyll-sass-converter (= 1.5.2) jekyll-seo-tag (= 2.6.1) jekyll-sitemap (= 1.4.0) @@ -55,7 +55,7 @@ GEM jekyll-theme-architect (= 0.1.1) jekyll-theme-cayman (= 0.1.1) jekyll-theme-dinky (= 0.1.1) - jekyll-theme-hacker (= 0.1.1) + jekyll-theme-hacker (= 0.1.2) jekyll-theme-leap-day (= 0.1.1) jekyll-theme-merlot (= 0.1.1) jekyll-theme-midnight (= 0.1.1) @@ -66,14 +66,14 @@ GEM jekyll-theme-tactile (= 0.1.1) jekyll-theme-time-machine (= 0.1.1) jekyll-titles-from-headings (= 0.5.3) - jemoji (= 0.11.1) + jemoji (= 0.12.0) kramdown (= 2.3.0) kramdown-parser-gfm (= 1.1.0) liquid (= 4.0.3) mercenary (~> 0.3) minima (= 2.5.1) nokogiri (>= 1.10.4, < 2.0) - rouge (= 3.19.0) + rouge (= 3.23.0) terminal-table (~> 1.4) github-pages-health-check (1.16.1) addressable (~> 2.3) @@ -81,7 +81,7 @@ GEM octokit (~> 4.0) public_suffix (~> 3.0) typhoeus (~> 1.3) - html-pipeline (2.13.0) + html-pipeline (2.14.0) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) @@ -114,14 +114,14 @@ GEM rouge (>= 2.0, < 4.0) jekyll-default-layout (0.1.4) jekyll (~> 3.0) - jekyll-feed (0.13.0) + jekyll-feed (0.15.1) jekyll (>= 3.7, < 5.0) jekyll-gist (1.5.0) octokit (~> 4.2) jekyll-github-metadata (2.13.0) jekyll (>= 3.4, < 5.0) octokit (~> 4.0, != 4.4.0) - jekyll-mentions (1.5.1) + jekyll-mentions (1.6.0) html-pipeline (~> 2.3) jekyll (>= 3.7, < 5.0) jekyll-optional-front-matter (0.3.2) @@ -129,14 +129,15 @@ GEM jekyll-paginate (1.1.0) jekyll-readme-index (0.3.0) jekyll (>= 3.0, < 5.0) - jekyll-redirect-from (0.15.0) + jekyll-redirect-from (0.16.0) jekyll (>= 3.3, < 5.0) jekyll-relative-links (0.6.1) jekyll (>= 3.3, < 5.0) - jekyll-remote-theme (0.4.1) + jekyll-remote-theme (0.4.2) addressable (~> 2.0) jekyll (>= 3.5, < 5.0) - rubyzip (>= 1.3.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) jekyll-sass-converter (1.5.2) sass (~> 3.4) jekyll-seo-tag (2.6.1) @@ -153,8 +154,8 @@ GEM jekyll-theme-dinky (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.1.1) - jekyll (~> 3.5) + jekyll-theme-hacker (0.1.2) + jekyll (> 3.5, < 5.0) jekyll-seo-tag (~> 2.0) jekyll-theme-leap-day (0.1.1) jekyll (~> 3.5) @@ -190,7 +191,7 @@ GEM nokogiri (~> 1.6) jekyll-watch (2.2.1) listen (~> 3.0) - jemoji (0.11.1) + jemoji (0.12.0) gemoji (~> 3.0) html-pipeline (~> 2.2) jekyll (>= 3.0, < 5.0) @@ -208,7 +209,7 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.14.1) + minitest (5.14.2) multipart-post (2.1.1) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) @@ -222,7 +223,7 @@ GEM rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.4) - rouge (3.19.0) + rouge (3.23.0) ruby-enum (0.8.0) i18n rubyzip (2.3.0) @@ -254,9 +255,9 @@ PLATFORMS ruby DEPENDENCIES - github-pages (~> 207) + github-pages (~> 209) jekyll (~> 3.9.0) - jekyll-redirect-from (~> 0.15.0) + jekyll-redirect-from (~> 0.16.0) jekyll-sitemap (~> 1.4.0) jekyll-toc (~> 0.5.1) diff --git a/docs/_docs/aws.md b/docs/_docs/aws.md index 96e98c089b6..33d3a51cbf6 100644 --- a/docs/_docs/aws.md +++ b/docs/_docs/aws.md @@ -4,7 +4,7 @@ category: documentation # AWS -## Import swagger documentation into AWS API Gateway +## Import OpenAPI documentation into AWS API Gateway The AWS API gateway service allows importing of an OpenAPI specification to create a REST API. The process is very straightforward and can be found [here](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-import-api.html). Here are some tips to consider when importing the documentation: diff --git a/docs/_docs/customizingyourgateway.md b/docs/_docs/customizingyourgateway.md index 00a1b2277d6..2be1b795ee8 100644 --- a/docs/_docs/customizingyourgateway.md +++ b/docs/_docs/customizingyourgateway.md @@ -23,11 +23,21 @@ You might want to serialize request/response messages in MessagePack instead of You can see [the default implementation for JSON](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/marshal_jsonpb.go) for reference. -### Using camelCase for JSON +### Using proto names in JSON -The protocol buffer compiler generates camelCase JSON tags that can be used with jsonpb package. By default jsonpb Marshaller uses `OrigName: true` which uses the exact case used in the proto files. To use camelCase for the JSON representation, +The protocol buffer compiler generates camelCase JSON tags that are used by default. +If you want to use the exact case used in the proto files, set `UseProtoNames: true`: ```go -mux := runtime.NewServeMux(runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{OrigName:false})) +mux := runtime.NewServeMux( + runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{ + MarshalOptions: protojson.MarshalOptions{ + UseProtoNames: true, + }, + UnmarshalOptions: protojson.UnmarshalOptions{ + DiscardUnknown: true, + }, + }), +) ``` ### Pretty-print JSON responses when queried with ?pretty @@ -42,7 +52,15 @@ For example: ```go mux := runtime.NewServeMux( - runtime.WithMarshalerOption("application/json+pretty", &runtime.JSONPb{Indent: " "}), + runtime.WithMarshalerOption("application/json+pretty", &runtime.JSONPb{ + MarshalOptions: protojson.MarshalOptions{ + Indent: " ", + Multiline: true, // Optional, implied by presence of "Indent". + }, + UnmarshalOptions: protojson.UnmarshalOptions{ + DiscardUnknown: true, + }, + }), ) prettier := func(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -57,22 +75,6 @@ prettier := func(h http.Handler) http.Handler { http.ListenAndServe(":8080", prettier(mux)) ``` -Note that `runtime.JSONPb{Indent: " "}` will do the trick for pretty-printing: it wraps -`jsonpb.Marshaler`: -```go -type Marshaler struct { - // ... - - // A string to indent each level by. The presence of this field will - // also cause a space to appear between the field separator and - // value, and for newlines to appear between fields and array - // elements. - Indent string - - // ... -} -``` - Now, either when passing the header `Accept: application/json+pretty` or appending `?pretty` to your HTTP endpoints, the response will be pretty-printed. @@ -81,42 +83,15 @@ also, this example code does not remove the query parameter `pretty` from furthe ## Customize unmarshaling per Content-Type -Having different unmarshaling options per Content-Type is possible by wrapping the decoder and passing that to `runtime.WithMarshalerOption`: - -```go -type m struct { - *runtime.JSONPb - unmarshaler *jsonpb.Unmarshaler -} - -type decoderWrapper struct { - *json.Decoder - *jsonpb.Unmarshaler -} - -func (n *m) NewDecoder(r io.Reader) runtime.Decoder { - d := json.NewDecoder(r) - return &decoderWrapper{Decoder: d, Unmarshaler: n.unmarshaler} -} - -func (d *decoderWrapper) Decode(v interface{}) error { - p, ok := v.(proto.Message) - if !ok { // if it's not decoding into a proto.Message, there's no notion of unknown fields - return d.Decoder.Decode(v) - } - return d.UnmarshalNext(d.Decoder, p) // uses m's jsonpb.Unmarshaler configuration -} -``` - -This scaffolding allows us to pass a custom unmarshal options. In this example, we configure the -unmarshaler to disallow unknown fields. For demonstration purposes, we'll also change some of the -default marshaler options: +Having different unmarshaling options per Content-Type is as easy as +configuring a custom marshaler: ```go mux := runtime.NewServeMux( - runtime.WithMarshalerOption("application/json+strict", &m{ - JSONPb: &runtime.JSONPb{EmitDefaults: true}, - unmarshaler: &jsonpb.Unmarshaler{AllowUnknownFields: false}, // explicit "false", &jsonpb.Unmarshaler{} would have the same effect + runtime.WithMarshalerOption("application/json+strict", &runtime.JSONPb{ + UnmarshalOptions: &protojson.UnmarshalOptions{ + DiscardUnknown: false, // explicit "false", &protojson.UnmarshalOptions{} would have the same effect + }, }), ) ``` @@ -258,83 +233,15 @@ gwMux := runtime.NewServeMux( ) ``` -## OpenTracing Support - -If your project uses [OpenTracing](https://github.com/opentracing/opentracing-go) and you'd like spans to propagate through the gateway, you can add some middleware which parses the incoming HTTP headers to create a new span correctly. - -```go -import ( - "github.com/opentracing/opentracing-go" - "github.com/opentracing/opentracing-go/ext" -) - -var grpcGatewayTag = opentracing.Tag{Key: string(ext.Component), Value: "grpc-gateway"} - -func tracingWrapper(h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - parentSpanContext, err := opentracing.GlobalTracer().Extract( - opentracing.HTTPHeaders, - opentracing.HTTPHeadersCarrier(r.Header)) - if err == nil || err == opentracing.ErrSpanContextNotFound { - serverSpan := opentracing.GlobalTracer().StartSpan( - "ServeHTTP", - // this is magical, it attaches the new span to the parent parentSpanContext, and creates an unparented one if empty. - ext.RPCServerOption(parentSpanContext), - grpcGatewayTag, - ) - r = r.WithContext(opentracing.ContextWithSpan(r.Context(), serverSpan)) - defer serverSpan.Finish() - } - h.ServeHTTP(w, r) - }) -} - -// Then just wrap the mux returned by runtime.NewServeMux() like this -if err := http.ListenAndServe(":8080", tracingWrapper(mux)); err != nil { - log.Fatalf("failed to start gateway server on 8080: %v", err) -} -``` - -Finally, don't forget to add a tracing interceptor when registering -the services. E.g. - -```go -import ( - "google.golang.org/grpc" - "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing" -) - -opts := []grpc.DialOption{ - grpc.WithUnaryInterceptor( - grpc_opentracing.UnaryClientInterceptor( - grpc_opentracing.WithTracer(opentracing.GlobalTracer()), - ), - ), -} -if err := pb.RegisterMyServiceHandlerFromEndpoint(ctx, mux, serviceEndpoint, opts); err != nil { - log.Fatalf("could not register HTTP service: %v", err) -} -``` - ## Error handler -The gateway uses two different error handlers for non-streaming requests: - - * `runtime.HTTPError` is called for errors from backend calls - * `runtime.OtherErrorHandler` is called for errors from parsing and routing client requests - -To override all error handling for a `*runtime.ServeMux`, use the -`runtime.WithProtoErrorHandler` serve option. - -Alternatively, you can override the global default `HTTPError` handling by -setting `runtime.GlobalHTTPErrorHandler` to a custom function, and override -the global default `OtherErrorHandler` by setting `runtime.OtherErrorHandler` -to a custom function. - -You should not set `runtime.HTTPError` directly, because that might break -any `ServeMux` set up with the `WithProtoErrorHandler` option. +To override error handling for a `*runtime.ServeMux`, use the +`runtime.WithErrorHandler` option. This will configure all unary error +responses to pass through this error handler. See https://mycodesmells.com/post/grpc-gateway-error-handler for an example -of writing a custom error handler function. +of writing a custom error handler function. Note that this post targets +the v1 release of the gateway, and you no longer assign to `HTTPError` to +configure an error handler. ## Stream Error Handler The error handler described in the previous section applies only @@ -358,7 +265,7 @@ mux := runtime.NewServeMux( The signature of the handler is much more rigid because we need to know the structure of the error payload to properly -encode the "chunk" schema into a Swagger/OpenAPI spec. +encode the "chunk" schema into an OpenAPI spec. So the function must return a `*runtime.StreamError`. The handler can choose to omit some fields and can filter/transform the original @@ -369,37 +276,44 @@ Here's an example custom handler: // handleStreamError overrides default behavior for computing an error // message for a server stream. // -// It uses a default "502 Bad Gateway" HTTP code; only emits "safe" -// messages; and does not set gRPC code or details fields (so they will +// It uses a default "502 Bad Gateway" HTTP code, only emits "safe" +// messages and does not set the details field (so it will // be omitted from the resulting JSON object that is sent to client). -func handleStreamError(ctx context.Context, err error) *runtime.StreamError { - code := http.StatusBadGateway +func handleStreamError(ctx context.Context, err error) *status.Status { + code := codes.Internal msg := "unexpected error" if s, ok := status.FromError(err); ok { - code = runtime.HTTPStatusFromCode(s.Code()) - // default message, based on the name of the gRPC code - msg = code.String() + code = s.Code() + // default message, based on the gRPC status + msg = s.Message() // see if error details include "safe" message to send // to external callers - for _, msg := s.Details() { + for _, msg := range s.Details() { if safe, ok := msg.(*SafeMessage); ok { msg = safe.Text break } } } - return &runtime.StreamError{ - HttpCode: int32(code), - HttpStatus: http.StatusText(code), - Message: msg, - } + return status.Errorf(code, msg) } ``` If no custom handler is provided, the default stream error handler will include any gRPC error attributes (code, message, detail messages), if the error being reported includes them. If the error does not have -these attributes, a gRPC code of `Unknown` (2) is reported. The default -handler will also include an HTTP code and status, which is derived -from the gRPC code (or set to `"500 Internal Server Error"` when -the source error has no gRPC attributes). +these attributes, a gRPC code of `Unknown` (2) is reported. + +## Routing Error handler +To override the error behavior when `*runtime.ServeMux` was not +able to serve the request due to routing issues, use the `runtime.WithRoutingErrorHandler` option. + +This will configure all HTTP routing errors to pass through this error handler. +Default behavior is to map HTTP error codes to gRPC errors. + +HTTP statuses and their mappings to gRPC statuses: +* HTTP `404 Not Found` -> gRPC `5 NOT_FOUND` +* HTTP `405 Method Not Allowed` -> gRPC `12 UNIMPLEMENTED` +* HTTP `400 Bad Request` -> gRPC `3 INVALID_ARGUMENT` + +This method is not used outside of the initial routing. diff --git a/docs/_docs/cygwin.md b/docs/_docs/cygwin.md index 8d4002ebc55..a089f5413be 100644 --- a/docs/_docs/cygwin.md +++ b/docs/_docs/cygwin.md @@ -36,7 +36,7 @@ From an elevated cmd.exe prompt set the GOPATH variable in Windows and add the ` Then `go get -u -v` the following packages: go get -u -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway - go get -u -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger + go get -u -v github.com/grpc-ecosystem/grpc-gateway/protoc-gen-openapiv2 go get -u -v github.com/golang/protobuf/protoc-gen-go This will probably fail with a similar output to this: @@ -65,7 +65,7 @@ Adjust steps 3, 5 and 7 like this. protoc expects native Windows paths. protoc -I. -I$(cygpath -w /usr/local/include) -I${GOPATH}/src -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:. ./path/to/your_service.proto protoc -I. -I$(cygpath -w /usr/local/include) -I${GOPATH}/src -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --grpc-gateway_out=logtostderr=true:. ./path/to/your_service.proto - protoc -I. -I$(cygpath -w /usr/local/include) -I${GOPATH}/src -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --swagger_out=logtostderr=true:. ./path/to/your_service.proto + protoc -I. -I$(cygpath -w /usr/local/include) -I${GOPATH}/src -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --openapiv2_out=logtostderr=true:. ./path/to/your_service.proto Then `cd` into the directory where your entry-point `main.go` file is located and run: diff --git a/docs/_docs/faq.md b/docs/_docs/faq.md index 348f77387b7..30e34011428 100644 --- a/docs/_docs/faq.md +++ b/docs/_docs/faq.md @@ -33,7 +33,7 @@ e.g. https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/interna AFAIK, no. But it should not be a big issue because the reverse-proxy which grpc-gateway generates usually works as an independent process and communicates with your gRPC server over TCP or a unix-domain socket. -## Why are the models in the swagger specification prefixed with the last part of the proto package name? +## Why are the models in the OpenAPI specification prefixed with the last part of the proto package name? The reason to generate the prefixes is that we don't have a guaranteed unique namespace. If two packages produce different Foo messages then we will have trouble. diff --git a/docs/_docs/features.md b/docs/_docs/features.md index 1bead42e17e..a137a289ffe 100644 --- a/docs/_docs/features.md +++ b/docs/_docs/features.md @@ -12,7 +12,7 @@ category: documentation * Enum fields in path parameter (including repeated enum fields). * Mapping streaming APIs to newline-delimited JSON streams * Mapping HTTP headers with `Grpc-Metadata-` prefix to gRPC metadata (prefixed with `grpcgateway-`) -* Optionally emitting API definition for [Swagger](http://swagger.io). +* Optionally emitting API definition for [OpenAPI](http://swagger.io). * Setting [gRPC timeouts](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md) through inbound HTTP `Grpc-Timeout` header. * Partial support for [gRPC API Configuration](https://cloud.google.com/endpoints/docs/grpc/grpc-service-config) files as an alternative to annotation. diff --git a/docs/_docs/grpcapiconfiguration.md b/docs/_docs/grpcapiconfiguration.md index a3b59703f37..14d96b908e9 100644 --- a/docs/_docs/grpcapiconfiguration.md +++ b/docs/_docs/grpcapiconfiguration.md @@ -28,11 +28,13 @@ Google Cloud Platform offers a way to do this for services hosted with them call grpc-gateway generators implement the [HTTP rules part](https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#httprule) of this specification. This allows you to take a completely unannotated service proto file, add a YAML file describing its HTTP endpoints and use them together like a annotated proto file with the grpc-gateway generators. +OpenAPI options may also be configured via ["OpenAPI Configuration"](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2/internal/descriptor/openapiconfig/openapiconfig.proto) in the form of YAML configuration files. + ### Usage of gRPC API Configuration YAML files The following is equivalent to the basic [usage example](usage.html) but without direct annotation for grpc-gateway in the .proto file. Only some steps require minor changes to use a gRPC API Configuration YAML file instead: 1. Define your service in gRPC as usual - + your_service.proto: ```protobuf syntax = "proto3"; @@ -41,7 +43,7 @@ The following is equivalent to the basic [usage example](usage.html) but without message StringMessage { string value = 1; } - + service YourService { rpc Echo(StringMessage) returns (StringMessage) {} } @@ -62,11 +64,11 @@ The following is equivalent to the basic [usage example](usage.html) but without Use a [linter](http://www.yamllint.com/) to validate your YAML. 3. Generate gRPC stub as before - + ```sh protoc -I. --go_out=plugins=grpc,paths=source_relative:./gen/go/ your/service/v1/your_service.proto ``` - + It will generate a stub file with path `./gen/go/your/service/v1/your_service.pb.go`. 4. Implement your service in gRPC as usual @@ -78,11 +80,28 @@ The following is equivalent to the basic [usage example](usage.html) but without protoc -I. --grpc-gateway_out=logtostderr=true,paths=source_relative,grpc_api_configuration=path/to/your_service.yaml:./gen/go \ your/service/v1/your_service.proto ``` - + This will generate a reverse proxy `gen/go/your/service/v1/your_service.pb.gw.go` that is identical to the one produced for the annotated proto. 6. Generate the optional your_service.swagger.json + ```sh + protoc -I . --swagger_out ./gen/go \ + --swagger_opt grpc_api_configuration=path/to/your_service.yaml \ + your/service/v1/your_service.proto + ``` + + or using an OpenAPI configuration file + + ```sh + protoc -I . --swagger_out ./gen/go \ + --swagger_opt grpc_api_configuration=path/to/your_service.yaml \ + --swagger_opt openapi_configuration=path/to/your_service_swagger.yaml \ + your/service/v1/your_service.proto + ``` + + For an example of an OpenAPI configuration file, see [unannotated_echo_service.swagger.yaml](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2/examples/internal/proto/examplepb/unannotated_echo_service.swagger.yaml), which adds OpenAPI options to [unannotated_echo_service.proto](https://github.com/grpc-ecosystem/grpc-gateway/tree/v2/examples/internal/proto/examplepb/unannotated_echo_service.proto). + ```sh protoc -I. --swagger_out=grpc_api_configuration=path/to/your_service.yaml:./gen/go \ your/service/v1/your_service.proto diff --git a/docs/_docs/healthcheck.md b/docs/_docs/healthcheck.md new file mode 100644 index 00000000000..7dd54e9f60e --- /dev/null +++ b/docs/_docs/healthcheck.md @@ -0,0 +1,35 @@ +--- +category: documentation +--- + +# Health check + +## With the [GRPC Health Checking Protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md) + +To use the GRPC health checking protocol you must add the two health checking methods, `Watch` and `Check`. + +#### Registering the health server + +1. Add `google.golang.org/grpc/health/grpc_health_v1` to your imports +2. Register the health server with `grpc_health_v1.RegisterHealthServer(grpcServer, yourService)` + +#### Adding the health check methods + +1. Check method + +``` +func (s *serviceServer) Check(ctx context.Context, in *health.HealthCheckRequest) (*health.HealthCheckResponse, error) { + return &health.HealthCheckResponse{Status: health.HealthCheckResponse_SERVING}, nil +} +``` + +2. Watch method + +``` +func (s *serviceServer) Watch(in *health.HealthCheckRequest, _ health.Health_WatchServer) error { + // Example of how to register both methods but only implement the Check method. + return status.Error(codes.Unimplemented, "unimplemented") +} +``` + +3. You can test the functionality with [GRPC health probe](https://github.com/grpc-ecosystem/grpc-health-probe) diff --git a/docs/_docs/httpbody.md b/docs/_docs/httpbody.md index 50dc523c9cb..62ebf49179d 100644 --- a/docs/_docs/httpbody.md +++ b/docs/_docs/httpbody.md @@ -3,16 +3,12 @@ category: documentation --- # HttpBody messages + The [HTTP Body](https://github.com/googleapis/googleapis/blob/master/google/api/httpbody.proto) messages allows a response message to be specified with custom data content and a custom content type header. The values included in the HTTPBody response will be used verbatim in the returned message from the gateway. Make sure you format your response carefully! ## Example Usage -1. Create a mux and configure it to use the `HTTPBodyMarshaler`. -```protobuf - mux := runtime.NewServeMux() - runtime.SetHTTPBodyMarshaler(mux) -``` -2. Define your service in gRPC with an httpbody response message +1. Define your service in gRPC with an httpbody response message ```protobuf import "google/api/httpbody.proto"; @@ -25,8 +21,14 @@ service HttpBodyExampleService { get: "/helloworld" }; } + rpc Download(google.protobuf.Empty) returns (stream google.api.HttpBody) { + option (google.api.http) = { + get: "/download" + }; + } } ``` + 3. Generate gRPC and reverse-proxy stubs and implement your service. ## Example service implementation @@ -38,4 +40,25 @@ func (*HttpBodyExampleService) Helloworld(ctx context.Context, in *empty.Empty) Data: []byte("Hello World"), }, nil } + +func (HttpBodyExampleService) Download(_ *empty.Empty, stream HttpBodyExampleService_DownloadServer) error { + msgs := []*httpbody.HttpBody{ + { + ContentType: "text/html", + Data: []byte("Hello 1"), + }, + { + ContentType: "text/html", + Data: []byte("Hello 2"), + }, + } + + for _, msg := range msgs { + if err := stream.Send(msg); err != nil { + return err + } + } + + return nil +} ``` diff --git a/docs/_docs/inject_router.md b/docs/_docs/inject_router.md new file mode 100644 index 00000000000..a3420e92c3e --- /dev/null +++ b/docs/_docs/inject_router.md @@ -0,0 +1,53 @@ +--- +category: documentation +title: Adding custom routes to the mux +--- + +# Adding custom routes to the mux + +The gRPC-gateway allows you to add custom routes to the serve mux, for example if you want to support a use case that isn't supported by the grpc-gateway, like file uploads. + +## Example + +```go +package main + +import ( + "context" + "net/http" + + pb "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/helloworld" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" +) + +func main() { + ctx := context.TODO() + mux := runtime.NewServeMux() + // Register generated routes to mux + err := pb.RegisterGreeterHandlerServer(ctx, mux, &GreeterServer{}) + if err != nil { + panic(err) + } + // Register custom route for GET /hello/{name} + err = mux.HandlePath("GET", "/hello/{name}", func(w http.ResponseWriter, r *http.Request, pathParams map[string]string) { + w.Write([]byte("hello " + pathParams["name"])) + }) + if err != nil { + panic(err) + } + http.ListenAndServe(":8080", mux) +} + + +// GreeterServer is the server API for Greeter service. +type GreeterServer struct { + +} + +// SayHello implement to say hello +func (h *GreeterServer) SayHello(ctx context.Context, req *pb.HelloRequest) (*pb.HelloReply, error) { + return &pb.HelloReply{ + Message: "hello " + req.Name, + }, nil +} +``` \ No newline at end of file diff --git a/docs/_docs/tracing.md b/docs/_docs/tracing.md new file mode 100644 index 00000000000..b6a641c20ed --- /dev/null +++ b/docs/_docs/tracing.md @@ -0,0 +1,177 @@ +--- +category: documentation +--- + +# Tracing + +## With [OpenCensus.io](https://opencenus.io) and [AWS X-ray](https://aws.amazon.com/xray/) + +#### Adding tracing using AWS-Xray as the exporter + +This example uses the AWS-Xray exporter with a global trace setting. Note that AWS X-ray exporter does not handle any metrics only tracing. + +1. Add the following imports + +```go +xray "contrib.go.opencensus.io/exporter/aws" +"go.opencensus.io/plugin/ocgrpc" +"go.opencensus.io/plugin/ochttp" +"go.opencensus.io/trace" +``` + +2. Register the AWS X-ray exporter for the GRPC server + +```go +xrayExporter, err := xray.NewExporter( + xray.WithVersion("latest"), + // Add your AWS region. + xray.WithRegion("ap-southeast-1"), +) +if err != nil { + // Handle any error. +} +// Do not forget to call Flush() before the application terminates. +defer xrayExporter.Flush() + +// Register the trace exporter. +trace.RegisterExporter(xrayExporter) +``` + +3. Add a global tracing configuration + +```go +// Always trace in this example. +// In production this can be set to a trace.ProbabilitySampler. +trace.ApplyConfig(trace.Config{DefaultSampler: trace.AlwaysSample()}) +``` + +4. Add `ocgrpc.ClientHandler` for tracing the grpc client calls + +```go +// Example using DialContext +conn, err := grpc.DialContext( + // Other options goes here. + // Add ocgrpc.ClientHandler for tracing the grpc client calls. + grpc.WithStatsHandler(&ocgrpc.ClientHandler{}), +) +``` + +5. Wrap the gateway mux with the OpenCensus HTTP handler +```go +gwmux := runtime.NewServeMux() + +openCensusHandler := &ochttp.Handler{ + Handler: gwmux, +} + +gwServer := &http.Server{ + Addr: "0.0.0.0:10000", + Handler: openCensusHandler, + }), +} +``` + +#### Without a global configuration + +In this example we have added the [GRPC Health Checking Protocol](https://github.com/grpc/grpc/blob/master/doc/health-checking.md) and we do not wish to trace any health checks. + +1. Follow step `1`, `2` and `4` from the previous section + +2. Since we are not using a global configuration we can decide what paths we want to trace + +```go +gwmux := runtime.NewServeMux() + +openCensusHandler := &ochttp.Handler{ + Handler: gwmux, + GetStartOptions: func(r *http.Request) trace.StartOptions { + startOptions := trace.StartOptions{} + if strings.HasPrefix(r.URL.Path, "/api") { + // This example will always trace anything starting with /api. + startOptions.Sampler = trace.AlwaysSample() + } + return startOptions + }, +} +``` + +4. No global configuration means we have to use the [per span sampler](https://opencensus.io/tracing/sampling/#per-span-sampler) + + +##### A method we want to trace +```go +func (s *service) Name(ctx context.Context, req *pb.Request) (*pb.Response, error) { + // Here we add the span ourselves. + ctx, span := trace.StartSpan(ctx, "name.to.use.in.trace", trace. + // Select a sampler that fits your implementation. + WithSampler(trace.AlwaysSample())) + defer span.End() + /// Other stuff goes here. +} +``` + +##### A method we do not wish to trace +```go +func (s *service) Check(ctx context.Context, in *health.HealthCheckRequest) (*health.HealthCheckResponse, error) { + // Note no span here. + return &health.HealthCheckResponse{Status: health.HealthCheckResponse_SERVING}, nil +} +``` + +## OpenTracing Support + +If your project uses [OpenTracing](https://github.com/opentracing/opentracing-go) and you'd like spans to propagate through the gateway, you can add some middleware which parses the incoming HTTP headers to create a new span correctly. + +```go +import ( + "github.com/opentracing/opentracing-go" + "github.com/opentracing/opentracing-go/ext" +) + +var grpcGatewayTag = opentracing.Tag{Key: string(ext.Component), Value: "grpc-gateway"} + +func tracingWrapper(h http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + parentSpanContext, err := opentracing.GlobalTracer().Extract( + opentracing.HTTPHeaders, + opentracing.HTTPHeadersCarrier(r.Header)) + if err == nil || err == opentracing.ErrSpanContextNotFound { + serverSpan := opentracing.GlobalTracer().StartSpan( + "ServeHTTP", + // this is magical, it attaches the new span to the parent parentSpanContext, and creates an unparented one if empty. + ext.RPCServerOption(parentSpanContext), + grpcGatewayTag, + ) + r = r.WithContext(opentracing.ContextWithSpan(r.Context(), serverSpan)) + defer serverSpan.Finish() + } + h.ServeHTTP(w, r) + }) +} + +// Then just wrap the mux returned by runtime.NewServeMux() like this +if err := http.ListenAndServe(":8080", tracingWrapper(mux)); err != nil { + log.Fatalf("failed to start gateway server on 8080: %v", err) +} +``` + +Finally, don't forget to add a tracing interceptor when registering +the services. E.g. + +```go +import ( + "google.golang.org/grpc" + "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing" +) + +opts := []grpc.DialOption{ + grpc.WithUnaryInterceptor( + grpc_opentracing.UnaryClientInterceptor( + grpc_opentracing.WithTracer(opentracing.GlobalTracer()), + ), + ), +} +if err := pb.RegisterMyServiceHandlerFromEndpoint(ctx, mux, serviceEndpoint, opts); err != nil { + log.Fatalf("could not register HTTP service: %v", err) +} +``` \ No newline at end of file diff --git a/docs/_docs/usage.md b/docs/_docs/usage.md index 23d613dd812..949daf88d87 100644 --- a/docs/_docs/usage.md +++ b/docs/_docs/usage.md @@ -4,213 +4,4 @@ category: documentation # How do I use this? -## Installation -First, you need to install ProtocolBuffers 3.0.0-beta-3 or later. - -```sh -mkdir tmp -cd tmp -git clone https://github.com/google/protobuf -cd protobuf -./autogen.sh -./configure -make -make check -sudo make install -``` - -Then, `go get -u` as usual the following packages: - -```sh -go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway -go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger -go get -u github.com/golang/protobuf/protoc-gen-go -``` - -## Usage -Make sure that your `$GOPATH/bin` is in your `$PATH`. - -1. Define your service in gRPC - - your_service.proto: - ```protobuf - syntax = "proto3"; - package example; - message StringMessage { - string value = 1; - } - - service YourService { - rpc Echo(StringMessage) returns (StringMessage) {} - } - ``` -2. Add a [custom option](https://cloud.google.com/service-management/reference/rpc/google.api#http) to the .proto file - - your_service.proto: - ```diff - syntax = "proto3"; - package example; - + - +import "google/api/annotations.proto"; - + - message StringMessage { - string value = 1; - } - - service YourService { - - rpc Echo(StringMessage) returns (StringMessage) {} - + rpc Echo(StringMessage) returns (StringMessage) { - + option (google.api.http) = { - + post: "/v1/example/echo" - + body: "*" - + }; - + } - } - ``` - - See [a_bit_of_everything.proto](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/a_bit_of_everything.proto) - for examples of more annotations you can add to customize gateway behavior - and generated Swagger output. - - If you do not want to modify the proto file for use with grpc-gateway you can alternatively use an external [gRPC API Configuration](https://cloud.google.com/endpoints/docs/grpc/grpc-service-config) file. [Check our documentation](grpcapiconfiguration.html) for more information. - -3. Generate gRPC stub - - ```sh - protoc -I/usr/local/include -I. \ - -I$GOPATH/src \ - -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ - --go_out=plugins=grpc:. \ - path/to/your_service.proto - ``` - - It will generate a stub file `path/to/your_service.pb.go`. -4. Implement your service in gRPC as usual - 1. (Optional) Generate gRPC stub in the language you want. - - e.g. - ```sh - protoc -I/usr/local/include -I. \ - -I$GOPATH/src \ - -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ - --ruby_out=. \ - path/to/your/service_proto - - protoc -I/usr/local/include -I. \ - -I$GOPATH/src \ - -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ - --plugin=protoc-gen-grpc=grpc_ruby_plugin \ - --grpc-ruby_out=. \ - path/to/your/service.proto - ``` - 2. Add the googleapis-common-protos gem (or your language equivalent) as a dependency to your project. - 3. Implement your service - -5. Generate reverse-proxy - - ```sh - protoc -I/usr/local/include -I. \ - -I$GOPATH/src \ - -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ - --grpc-gateway_out=logtostderr=true:. \ - path/to/your_service.proto - ``` - - It will generate a reverse proxy `path/to/your_service.pb.gw.go`. - - Note: After generating the code for each of the stubs, to build the code, you will want to run ```go get .``` from the directory containing the stubs. - -6. Write an entry point - - Now you need to write an entry point of the proxy server. - ```go - package main - - import ( - "flag" - "net/http" - - "github.com/golang/glog" - "golang.org/x/net/context" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "google.golang.org/grpc" - - gw "path/to/your_service_package" - ) - - var ( - echoEndpoint = flag.String("echo_endpoint", "localhost:9090", "endpoint of YourService") - ) - - func run() error { - ctx := context.Background() - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - mux := runtime.NewServeMux() - opts := []grpc.DialOption{grpc.WithInsecure()} - err := gw.RegisterYourServiceHandlerFromEndpoint(ctx, mux, *echoEndpoint, opts) - if err != nil { - return err - } - - return http.ListenAndServe(":8080", mux) - } - - func main() { - flag.Parse() - defer glog.Flush() - - if err := run(); err != nil { - glog.Fatal(err) - } - } - ``` - -7. (Optional) Generate swagger definitions - - ```sh - protoc -I/usr/local/include -I. \ - -I$GOPATH/src \ - -I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ - --swagger_out=logtostderr=true:. \ - path/to/your_service.proto - ``` - -## Parameters and flags - -During code generation with `protoc`, flags to grpc-gateway tools must be passed -through protoc using the `--_out=:` pattern, for -example: - -```sh ---grpc-gateway_out=logtostderr=true,repeated_path_param_separator=ssv:. ---swagger_out=logtostderr=true,repeated_path_param_separator=ssv:. -``` - -`protoc-gen-grpc-gateway` supports custom mapping from Protobuf `import` to Golang import path. -They are compatible with [the parameters with the same names in `protoc-gen-go`](https://github.com/golang/protobuf#parameters). - -Besides we also support the `request_context` parameter to use the `http.Request`'s Context (only for Go 1.7 and above). -This parameter can be useful to pass the request-scoped context between the gateway and the gRPC service. - -`protoc-gen-grpc-gateway` also supports some more command line flags to control logging. You can give these flags together with the parameters above. Run `protoc-gen-grpc-gateway --help` for more details about the flags. - -Similarly, `protoc-gen-swagger` supports command-line flags to control Swagger -output (for example, `json_names_for_fields` to output JSON names for fields -instead of protobuf names). Run `protoc-gen-swagger --help` for more flag -details. Further Swagger customization is possible by annotating your `.proto` -files with options from -[openapiv2.proto](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/protoc-gen-swagger/options/openapiv2.proto) - see -[a_bit_of_everything.proto](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/a_bit_of_everything.proto) -for examples. - -# Mapping gRPC to HTTP - -* [How gRPC error codes map to HTTP status codes in the response](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/runtime/errors.go#L15) -* HTTP request source IP is added as `X-Forwarded-For` gRPC request header -* HTTP request-host is added as `X-Forwarded-Host` gRPC request header -* HTTP `Authorization` header is added as `authorization` gRPC request header -* Remaining Permanent HTTP header keys (as specified by the IANA [here](http://www.iana.org/assignments/message-headers/message-headers.xhtml) are prefixed with `grpcgateway-` and added with their values to gRPC request header -* HTTP headers that start with 'Grpc-Metadata-' are mapped to gRPC metadata (after removing prefix 'Grpc-Metadata-') -* While configurable, the default {un,}marshaling uses [jsonpb](https://godoc.org/github.com/golang/protobuf/jsonpb) with `OrigName: true`. +See the README in [the repo](https://github.com/grpc-ecosystem/grpc-gateway/). diff --git a/docs/_docs/usegotemplates.md b/docs/_docs/usegotemplates.md index f0825e07bd7..f984879021d 100644 --- a/docs/_docs/usegotemplates.md +++ b/docs/_docs/usegotemplates.md @@ -16,10 +16,10 @@ as: By default this function is turned off, so if you want to use it you have to set the `use_go_templates` flag to true inside of the -`swagger_out` flag. +`openapiv2_out` flag. ```shell ---swagger_out=use_go_templates=true:. +--openapiv2_out=use_go_templates=true:. ``` ### Example script @@ -30,7 +30,7 @@ Example of a bash script with the `use_go_templates` flag set to true: $ protoc -I. \ --go_out=plugins=grpc:. \ --grpc-gateway_out=logtostderr=true:. \ - --swagger_out=logtostderr=true,use_go_templates=true:. \ + --openapiv2_out=logtostderr=true,use_go_templates=true:. \ path/to/my/proto/v1/myproto.proto ``` @@ -80,19 +80,19 @@ The content of `tables.md`: | {{.Number}} | {{.Name}} | {{if eq .Label.String "LABEL_REPEATED"}}[]{{end}}{{.Type}} | {{fieldcomments .Message .}} | {{end}} ``` -## Swagger output +## OpenAPI output ### SwaggerUI -This is how the swagger file would be rendered in [SwaggerUI](https://swagger.io/tools/swagger-ui/) +This is how the OpenAPI file would be rendered in [Swagger UI](https://swagger.io/tools/swagger-ui/) -![Screenshot swaggerfile in SwaggerUI](https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/master/docs/_imgs/gotemplates/swaggerui.png) +![Screenshot OpenAPI file in SwaggerUI](https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/master/docs/_imgs/gotemplates/swaggerui.png) ### Postman -This is how the swagger file would be rendered in [Postman](https://www.getpostman.com/) +This is how the OpenAPI file would be rendered in [Postman](https://www.getpostman.com/) -![Screenshot swaggerfile in Postman](https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/master/docs/_imgs/gotemplates/postman.png) +![Screenshot OpenAPI file in Postman](https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/master/docs/_imgs/gotemplates/postman.png) For a more detailed example of a protofile that has Go templates enabled, [see the examples](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/examples/internal/proto/examplepb/use_go_template.proto). diff --git a/docs/_docs/v2-migration.md b/docs/_docs/v2-migration.md new file mode 100644 index 00000000000..35d72e2498f --- /dev/null +++ b/docs/_docs/v2-migration.md @@ -0,0 +1,173 @@ +--- +title: v2 migration guide +category: documentation +--- + +# gRPC-Gateway v2 migration guide + +This guide is supposed to help users of the gateway migrate from v1 to v2. +See https://github.com/grpc-ecosystem/grpc-gateway/issues/1223 for detailed +information on all changes that were made specifically to v2. + +The following behavioural defaults have been changed: + +## protoc-gen-swagger has been renamed protoc-gen-openapiv2 + +See +[the original issue](https://github.com/grpc-ecosystem/grpc-gateway/issues/675) +for more information. Apart from the new name, the only real +difference to users will be a slightly different proto annotation: + +```protobuf +import "protoc-gen-openapiv2/options/annotations.proto"; +``` +instead of +```protobuf +import "protoc-gen-swagger/options/annotations.proto"; +``` +and +```protobuf +option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { +``` +instead of +```protobuf +option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { +``` + +The bazel rule has been renamed `protoc_gen_openapiv2`. + +## The example field in the OpenAPI annotations is now a string + +This was a `google.protobuf.Any` type, but it was only used for the JSON +representation, and it was breaking some tools and it was generally unclear to the user +how it works. It is now a string instead. The value is copied verbatim to +the output OpenAPI file. Remember to escape any quotes in the strings. + +For example, if you had an example that looked like this: + +```protobuf +example: { value: '{ "uuid": "0cf361e1-4b44-483d-a159-54dabdf7e814" }' } +``` + +It would now look like this: + +```protobuf +example: "{\"uuid\": \"0cf361e1-4b44-483d-a159-54dabdf7e814\"}" +``` + +See `a_bit_of_everything.proto` in the example protos for more examples. + +## We now use the camelCase JSON names by default +See +[the original issue](https://github.com/grpc-ecosystem/grpc-gateway/issues/375) +and +[original pull request](https://github.com/grpc-ecosystem/grpc-gateway/pull/540) +for more information. + +If you want to revert to the old behaviour, configure a custom marshaler with +`UseProtoNames: true`: +```go +mux := runtime.NewServeMux( + runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.HTTPBodyMarshaler{ + Marshaler: &runtime.JSONPb{ + MarshalOptions: protojson.MarshalOptions{ + UseProtoNames: true, + EmitUnpopulated: true, + }, + UnmarshalOptions: protojson.UnmarshalOptions{ + DiscardUnknown: true, + }, + }, + }), +) +``` + +To change the OpenAPI generator behaviour to match, set `json_names_for_fields=false` when generating: + +```shell +--openapiv2_out=json_names_for_fields=false:./gen/openapiv2 path/to/my/proto/v1/myproto.proto +``` + +If using the Bazel rule, set `json_names_for_fields=False`. + +## We now emit default values for all fields + +See [the original issue](https://github.com/grpc-ecosystem/grpc-gateway/issues/233) +for more information. + +If you want to revert to the old behaviour, configure a custom marshaler with +`EmitUnpopulated: false`: +```go +mux := runtime.NewServeMux( + runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.HTTPBodyMarshaler{ + Marshaler: &runtime.JSONPb{ + MarshalOptions: protojson.MarshalOptions{ + EmitUnpopulated: false, + }, + UnmarshalOptions: protojson.UnmarshalOptions{ + DiscardUnknown: true, + }, + }, + }), +) +``` + +## We now support google.api.HttpBody message types by default + +The `runtime.SetHTTPBodyMarshaler` function has disappeared, and is now +enabled by default. If you for some reason don't want `HttpBody` messages to be +respected, you can disable it by overwriting the default marshaler with one which +does not wrap `runtime.JSONPb` in `runtime.HTTPBodyMarshaler`: + +```go +mux := runtime.NewServeMux( + runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.JSONPb{ + MarshalOptions: protojson.MarshalOptions{ + EmitUnpopulated: true, + }, + UnmarshalOptions: protojson.UnmarshalOptions{ + DiscardUnknown: true, + }, + }), +) +``` + +## runtime.DisallowUnknownFields has been removed + +All marshalling settings are now inherited from the configured marshaler. If you wish +to disallow unknown fields, configure a custom marshaler: + +```go +mux := runtime.NewServeMux( + runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.HTTPBodyMarshaler{ + Marshaler: &runtime.JSONPb{ + MarshalOptions: protojson.MarshalOptions{ + EmitUnpopulated: true, + }, + UnmarshalOptions: protojson.UnmarshalOptions{ + DiscardUnknown: false, + }, + }, + }), +) +``` + +## WithLastMatchWins and allow_colon_final_segments=true is now default behaviour + +If you were previously specifying these, please remove them, as this is now +the default behaviour. See +[the original issue](https://github.com/grpc-ecosystem/grpc-gateway/issues/224) +for more information. + +There is no workaround for this, as we considered it a correct interpretation of the spec. +If this breaks your application, carefully consider the order in which you define your +services. + +## Error handling configuration has been overhauled + +`runtime.HTTPError`, `runtime.OtherErrorHandler`, `runtime.GlobalHTTPErrorHandler`, +`runtime.WithProtoErrorHandler` are all gone. Error handling is rewritten around the +use of gRPCs Status types. If you wish to configure how the gateway handles errors, +please use `runtime.WithErrorHandler` and `runtime.WithStreamErrorHandler`. +To handle routing errors (similar to the removed `runtime.OtherErrorHandler`) please use +`runtime.WithRoutingErrorHandler`. diff --git a/examples/internal/README.md b/examples/internal/README.md index 26d568c8a34..55a1234d694 100644 --- a/examples/internal/README.md +++ b/examples/internal/README.md @@ -8,7 +8,7 @@ $ dep init Follow the guides from this [README.md](./browser/README.md) to run the server and gateway. ```bash # Make sure you are in the correct directory: -# $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/examples +# $GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/v2/examples $ cd examples/internal/browser $ pwd @@ -26,7 +26,7 @@ Then you can use curl or a browser to test: ```bash # List all apis -$ curl http://localhost:8080/swagger/echo_service.swagger.json +$ curl http://localhost:8080/openapiv2/echo_service.swagger.json # Visit the apis $ curl -XPOST http://localhost:8080/v1/example/echo/foo diff --git a/examples/internal/browser/a_bit_of_everything_service.spec.js b/examples/internal/browser/a_bit_of_everything_service.spec.js index 21512ab78aa..66ccd54ece7 100644 --- a/examples/internal/browser/a_bit_of_everything_service.spec.js +++ b/examples/internal/browser/a_bit_of_everything_service.spec.js @@ -7,7 +7,7 @@ describe('ABitOfEverythingService', function() { beforeEach(function(done) { new SwaggerClient({ - url: "http://localhost:8080/swagger/a_bit_of_everything.swagger.json", + url: "http://localhost:8080/openapiv2/a_bit_of_everything.swagger.json", usePromise: true, }).then(function(c) { client = c; diff --git a/examples/internal/browser/echo_service.spec.js b/examples/internal/browser/echo_service.spec.js index 97888c3e6c7..72aa13ca48e 100644 --- a/examples/internal/browser/echo_service.spec.js +++ b/examples/internal/browser/echo_service.spec.js @@ -7,7 +7,7 @@ describe('EchoService', function() { beforeEach(function(done) { new SwaggerClient({ - url: "http://localhost:8080/swagger/echo_service.swagger.json", + url: "http://localhost:8080/openapiv2/echo_service.swagger.json", usePromise: true, }).then(function(c) { client = c; diff --git a/examples/internal/browser/gulpfile.js b/examples/internal/browser/gulpfile.js index a0a2411525d..f287428d80e 100644 --- a/examples/internal/browser/gulpfile.js +++ b/examples/internal/browser/gulpfile.js @@ -16,11 +16,11 @@ gulp.task('bower', function () { }); gulp.task('server', shell.task([ - 'go build -o bin/example-server github.com/grpc-ecosystem/grpc-gateway/examples/internal/cmd/example-grpc-server', + 'go build -o bin/example-server github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/cmd/example-grpc-server', ])); gulp.task('gateway', shell.task([ - 'go build -o bin/example-gw github.com/grpc-ecosystem/grpc-gateway/examples/internal/cmd/example-gateway-server', + 'go build -o bin/example-gw github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/cmd/example-gateway-server', ])); gulp.task('serve-server', ['server'], function () { @@ -32,7 +32,7 @@ gulp.task('serve-server', ['server'], function () { gulp.task('serve-gateway', ['gateway', 'serve-server'], function () { gprocess.start('gateway-server', 'bin/example-gw', [ - '--logtostderr', '--swagger_dir', path.join(__dirname, "../proto/examplepb"), + '--logtostderr', '--openapi_dir', path.join(__dirname, "../proto/examplepb"), ]); gulp.watch('bin/example-gw', ['serve-gateway']); }); diff --git a/examples/internal/browser/index.html b/examples/internal/browser/index.html index 7817451ca82..da9e223e3bf 100644 --- a/examples/internal/browser/index.html +++ b/examples/internal/browser/index.html @@ -4,7 +4,7 @@