Releases: grpc-ecosystem/grpc-gateway
v2.9.0
This release adds the ability to filter properties (Services, RPCs, Fields, Enum values) from being rendered in the OpenAPI v2 spec generated by protoc-gen-openapiv2
. See https://grpc-ecosystem.github.io/grpc-gateway/docs/mapping/customizing_openapi_output/#hiding-fields-methods-services-and-enum-values for more information about this new exciting capability!
Other new features:
- A new option to generate the OpenAPI v2 spec in YAML format
- Allow serving a health endpoint at an arbitrary path with the new
WithHealthEndpointAt
ServeMux
option
What's Changed
- Annotate incoming and outgoing context by @rogchap in #2574
- protoc-gen-openapiv2: support YAML OpenAPI/Swagger v2 definition generation by @hedhyw in #2579
- Add support for
google.api.VisibilityRule
s annotations to hide APIs and fields by @BCook98 in #2578 - feature/custom HTTP health check endpoint by @antonioiubatti93 in #2587
New Contributors
- @rogchap made their first contribution in #2574
- @hedhyw made their first contribution in #2579
- @BCook98 made their first contribution in #2578
- @antonioiubatti93 made their first contribution in #2587
Full Changelog: v2.8.0...v2.9.0
v2.8.0
Overview
This release introduces the new WithHealthzEndpoint
which makes it easy to forward your gRPC health check endpoint to your gRPC-gateway server, and fixes a long standing bug in protoc-gen-openapiv2
where path parameters were included in both the path and the body of the generated spec (#1670 and #1015).
What's Changed
- Include Package in Service Tags when Option is Enabled by @dkiswanto in #2519
- Add
WithHealthzEndpoint
asServeMuxOption
to register a/healthz
endpoint by @brumhard in #2319 - protoc-gen-openapiv2: remove path parameters from body parameters by @oyvindwe in #2553
New Contributors
- @dkiswanto made their first contribution in #2519
- @brumhard made their first contribution in #2319
- @oyvindwe made their first contribution in #2553
Full Changelog: v2.7.3...v2.8.0
v2.7.3
What's Changed
- Update gorelease base to v2.7.2 by @johanbrandhorst in #2467
- Fix README typo about manuall generation by @baryluk in #2471
- Use insecure.NewCredentials instead of grpc.WithInsecure by @jxlwqq in #2470
- fix typos by @haiker2011 in #2474
- docs: specify invalid cases for FieldMask by @hhhapz in #2477
- typo in mux.go by @gabroo in #2479
- Add omit-enum-default-value option to protoc-gen-openapiv2 by @hiroyoshii in #2480
- update plugin option of customizing_openapi_output docs by @hiroyoshii in #2490
- embedding UnimplementedGreeterServer to creating_main.go.md server struct by @mkusaka in #2502
- Fixes additional paths generated when many methods have the same resource path by @aethanol in #2496
New Contributors
- @baryluk made their first contribution in #2471
- @jxlwqq made their first contribution in #2470
- @haiker2011 made their first contribution in #2474
- @hhhapz made their first contribution in #2477
- @gabroo made their first contribution in #2479
- @hiroyoshii made their first contribution in #2480
- @mkusaka made their first contribution in #2502
- @aethanol made their first contribution in #2496
Full Changelog: v2.7.2...v2.7.3
v2.7.2
What's Changed
- Log warning if HeaderMatcherFunc passes malformed HTTP headers to grpc server by @MakDon in #2455
- Fixes #407 and #1700 - google.api.http path parameter constraints and multiple HTTP path/method endpoint support by @betmix-matt in #2461
This fixes a long standing issue with OpenAPI spec generation in the face of complex path parameter use
New Contributors
- @MakDon made their first contribution in #2455
- @betmix-matt made their first contribution in #2461
Full Changelog: v2.7.1...v2.7.2
v2.7.1
What's Changed
- Replace "github.com/ghodss/yaml" with "sigs.k8s.io/yaml" by @slntopp in #2436
- build: upgrade
go
directive ingo.mod
to 1.17 by @Juneezee in #2443 - Revert "support grpc.ClientConnInterface in RegisterXXXHandler (#2398)" by @shane-kerr in #2444
New Contributors
- @slntopp made their first contribution in #2436
- @Juneezee made their first contribution in #2443
- @shane-kerr made their first contribution in #2444
Full Changelog: v2.7.0...v2.7.1
v2.7.0
What's Changed
- Decode path-encoded URL components by @v3n in #2332
- Add docs for merging OpenAPI into a single file by @alee792 in #2354
- Fix timestamp string conversion by @momom-i in #2367
- Upgrade bazel toolchain by @johanbrandhorst in #2390
- Log zero property as warning instead of error by @jungwinter in #2387
- support grpc.ClientConnInterface in RegisterXXXHandler by @defool in #2398
- Allow OpenAPI query parameters to be generated for all HTTP methods, regardless of body by @alee792 in #2402
New Contributors
- @v3n made their first contribution in #2332
- @alee792 made their first contribution in #2354
- @0rax made their first contribution in #2386
- @jungwinter made their first contribution in #2387
- @defool made their first contribution in #2398
- @AdamKorcz made their first contribution in #2405
- @jzelinskie made their first contribution in #2413
- @aronrichter made their first contribution in #2412
Full Changelog: v2.6.0...v2.7.0
v2.6.0
Major features in this release include:
- The ability to auto-generate the
x-nullable
field from proto3 optional in openapiv2 contributed by Ken Brownfield (@irridia) in #2215 - More comprehensive openapiv2 name generation options contributed by @alperengozeten and Malte Isberner (@misberner) in #2310
As well as various bug fixes, including the auto generation of the Www-Authenticate
header when returning an 401 Unauthorized error (#2314), better google.protobuf.Any
representation in openapiv2 files (#2292) and much more.
This is also the first release to automatically publish the Protobuf plugins to the Buf Schema Registry. See https://buf.build/grpc-ecosystem/plugins. These can be used together with the new buf generate
remote plugins feature: https://docs.buf.build/configuration/v1/buf-gen-yaml#name-or-remote. An example buf.gen.yaml
using these new plugins looks like this:
version: v1
plugins:
- remote: buf.build/library/plugins/go:v1.27.1-1
out: gen/go
opt: paths=source_relative
- remote: buf.build/library/plugins/go-grpc:v1.1.0-2
out: gen/go
opt: paths=source_relative
- remote: buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.6.0-1
out: gen/go
opt: paths=source_relative
- remote: buf.build/grpc-ecosystem/plugins/openapiv2:v2.6.0-1
out: gen/openapiv2
v2.5.0
This release adds support for extracting the HTTP path for an incoming request through the request context. Thanks to @0daryo for the contribution!
Note that this release slightly changes the behavior of the generator, so you must ensure that you are using the new version of the runtime library after updating the generator to this new version.
v2.4.0
This release adds support for customizing routing error HTTP status codes. Thanks to @electrofelix for the contribution!
Other changes
- implements a max recursive depth check by @drewwells in #2022
- Fix typo in README.md by @cxmcc in #2047
- Add doc with info about binary upload a custom route, for #500 by @jonathanbp in #2063
- Fix path params being in the body by @stijndehaes in #2078
- Update CI to use 1.16 and latest release by @johanbrandhorst in #2099
- Patcher for fields of type google.protobuf.Any by @veith in #2103
New Contributors
- @drewwells made their first contribution in #2022
- @cxmcc made their first contribution in #2047
- @jonathanbp made their first contribution in #2063
- @stijndehaes made their first contribution in #2078
- @veith made their first contribution in #2103
- @electrofelix made their first contribution in #2101
Full Changelog: v2.3.0...v2.4.0
v2.3.0
This release migrates our internal generation strategy to using buf, and also updates the installation instructions to instruct users how to use buf
to manage the googleapis dependencies in their own projects. If you are used to copying the third_party folder for your dependencies, you are now encouraged to check out the usage instructions again to see how to use buf
to manage your dependencies instead.
The boilerplate repo contains an example.
v2.3.0 (2021-02-25)
Implemented enhancements:
- Support optional annotation in proto3 files in generators #1278
Fixed bugs:
- grpc-gateway v2 misreads grpc protobuf field_mask behavior, breaks existing valid behavior #1766
Closed issues:
- grpc-gateway service run error #1996
- ../proto/api/proto/service.pb.gw.go:129:95: cannot use *StringMessage value as type protoreflect.ProtoMessage in return argument: *StringMessage does not implement protoreflect.ProtoMessage (missing ProtoReflect method) #1989
- Grpc healthcheck docs are unclear #1977
- Gateway protoc does not generate protoreflect.ProtoMessage messages #1959
- [bazel] Got "missing strict dependencies" when use protoc-gen-grpc-gateway as bazel-gazelle grpc compiler #1941
- Non official implementation #1940
- Empty fields included in response. #1871
Merged pull requests:
- fix(deps): update module google.golang.org/grpc to v1.36.0 (master) #1999 (renovate[bot])
- fix(deps): update google.golang.org/genproto commit hash to 063164c (master) #1998 (renovate[bot])
- chore(deps): update dependency com_google_protobuf to v3.15.2 (master) #1995 (renovate[bot])
- chore(deps): update bufbuild/buf docker tag to v0.37.1 (master) #1994 (renovate[bot])
- fix(deps): update google.golang.org/genproto commit hash to 22b48be (master) #1993 (renovate[bot])
- fix(deps): update google.golang.org/genproto commit hash to 3e1e516 (master) #1991 (renovate[bot])
- fix(deps): update google.golang.org/genproto commit hash to aa3ee6e (master) #1990 (renovate[bot])
- chore(deps): update dependency com_google_protobuf to v3.15.1 (master) #1987 (renovate[bot])
- fix(deps): update golang.org/x/oauth2 commit hash to 9bb9049 (master) #1986 (renovate[bot])
- fix(deps): update google.golang.org/genproto commit hash to d891e3c (master) #1985 (renovate[bot])
- chore(deps): update dependency com_google_protobuf to v3.15.0 (master) #1984 (renovate[bot])
- fix(deps): update golang.org/x/oauth2 commit hash to ba52d33 (master) #1983 (renovate[bot])
- fix(deps): update google.golang.org/genproto commit hash to fe80b38 (master) #1982 (renovate[bot])
- chore(deps): update google.golang.org/genproto commit hash to c185827 (master) #1979 (renovate[bot])
- Use base64.URLEncoding for []byte parameters in query #1978 (tvoll)
- chore(deps): update golang docker tag to v1.16.0 (master) #1976 (renovate[bot])
- chore(deps): update golang.org/x/oauth2 commit hash to 16ff188 (master) #1974 (renovate[bot])
- adding UnimplementedGreeterServer to server struct #1973 (nwandabridges)
- [Bazel] Update protobuf, rules_go and gazelle #1972 (aaliddell)
- Migrate generation, linting to buf #1971 (johanbrandhorst)
- chore(deps): update google.golang.org/genproto commit hash to e7f2df4 (master) #1970 (renovate[bot])
- chore(deps): update google.golang.org/genproto commit hash to 4ccc9a5 (master) #1969 (renovate[bot])
- Bump nokogiri from 1.10.10 to 1.11.1 in /docs #1967 (dependabot[bot])
- docs/Gemfile.lock: Fix dependabot security warning #1966 (ivucica)
- chore(deps): update google.golang.org/genproto commit hash to 3a9a48d (master) #1965 (renovate[bot])
- chore(deps): update golang.org/x/oauth2 commit hash to 6667018 (master) #1964 (renovate[bot])
- Update CONTRIBUTING.md on release description #1960 (adambabik)
- gen-grpc-gateway, gen-openapiv2: add support for proto3 optional #1951 (adambabik)
- FAQ Adding related projects to the documentation #1946 (rodoufu)