grpc-gateway v2.20.0 版本更新介绍
发布日期: 2024-05-15
版本号: v2.20.0
本次更新包含多项功能改进、问题修复及文档优化。主要变更包括:新增api_visibility选项以隐藏请求/响应消息,增强非Proto字段的序列化缩进处理,修复响应头写入逻辑及日志级别设置,优化枚举字段空值的处理方式,修正X-Forwarded标头处理逻辑,并添加了请求体日志记录示例。文档方面更新了CoreOS示例分支至master,修复多处拼写错误及注释问题。此外,Bazel构建规则新增禁用默认响应选项。共有10位新贡献者参与了本次版本开发,包括@Place1、@avoidalone、@richzw等开发者。
更新内容 (中文)
变更内容
- 通过 @Place1 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3966 中实现 api_visibility 选项透传隐藏请求/响应消息
- 通过 @gknw 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4027 中实现带缩进的非 proto 字段序列化
- 通过 @avoidalone 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4092 中修复部分注释
- 通过 @richzw 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4108 中新增状态码非200时记录请求体的示例
- 通过 @rajukrishnamurthy 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4126 中在规则定义中暴露 –disable_default_responses 参数
- 通过 @johanbrandhorst 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4131 中修复响应写入器包装导致的测试死循环
- 通过 @jeromefroe 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4180 中实现枚举值为空时自动省略枚举字段
- 通过 @mohamedawnallah 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4198 中将 CoreOS 示例分支更新至
master
- 通过 @mountcount 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4183 中删除重复用词
- 通过 @umakantv 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4212 中修复示例文档拼写错误
- 通过 @joshgarnett 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4259 中设置未启用 doForwardTrailers 时自动写入 Content-Length 响应头
- 通过 @joshgarnett 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4265 中修复非确定性的 TestOutgoingTrailerMatcher 测试用例
- 通过 @MakDon 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4322 中更新 README.md
- 通过 @rajeshkarnena 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4327 中修复错误日志级别设置问题(#4245)
- 通过 @haines 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4334 中正确处理
X-Forwarded-*
请求头
新贡献者
- @Place1 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3966 完成首次贡献
- @avoidalone 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4092 完成首次贡献
- @richzw 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4108 完成首次贡献
- @rajukrishnamurthy 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4126 完成首次贡献
- @jeromefroe 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4180 完成首次贡献
- @mohamedawnallah 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4198 完成首次贡献
- @mountcount 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4183 完成首次贡献
- @umakantv 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4212 完成首次贡献
- @joshgarnett 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4259 完成首次贡献
- @rajeshkarnena 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/4327 完成首次贡献
完整更新日志: https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.19.1...v2.20.0
更新内容 (原始)
What’s Changed
- api_visibility option now transitively hides request/response messages by @Place1 in https://github.com/grpc-ecosystem/grpc-gateway/pull/3966
- Marshal non proto fields with indents by @gknw in https://github.com/grpc-ecosystem/grpc-gateway/pull/4027
- chore: fix some comments by @avoidalone in https://github.com/grpc-ecosystem/grpc-gateway/pull/4092
- chore(examples): add one example to log request body when the status code is non 200 by @richzw in https://github.com/grpc-ecosystem/grpc-gateway/pull/4108
- feat(bazel): surface –disable_default_responses in rule def by @rajukrishnamurthy in https://github.com/grpc-ecosystem/grpc-gateway/pull/4126
- integration: fix wrapping of response writer causing endless test loop by @johanbrandhorst in https://github.com/grpc-ecosystem/grpc-gateway/pull/4131
- Omit enum field when value is empty by @jeromefroe in https://github.com/grpc-ecosystem/grpc-gateway/pull/4180
- docs/mapping/examples.md: update CoreOS example GitHub branch to
master
branch by @mohamedawnallah in https://github.com/grpc-ecosystem/grpc-gateway/pull/4198 - chore: remove repetitive word by @mountcount in https://github.com/grpc-ecosystem/grpc-gateway/pull/4183
- Fix Typo in examples.md by @umakantv in https://github.com/grpc-ecosystem/grpc-gateway/pull/4212
- Write Content-Length header if doForwardTrailers is not set by @joshgarnett in https://github.com/grpc-ecosystem/grpc-gateway/pull/4259
- Fixing TestOutgoingTrailerMatcher, which was non-deterministic by @joshgarnett in https://github.com/grpc-ecosystem/grpc-gateway/pull/4265
- Update README.md by @MakDon in https://github.com/grpc-ecosystem/grpc-gateway/pull/4322
- fix(4245): setting appropriate log level for error logs by @rajeshkarnena in https://github.com/grpc-ecosystem/grpc-gateway/pull/4327
- fix: handle
X-Forwarded-*
headers correctly by @haines in https://github.com/grpc-ecosystem/grpc-gateway/pull/4334
New Contributors
- @Place1 made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/3966
- @avoidalone made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/4092
- @richzw made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/4108
- @rajukrishnamurthy made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/4126
- @jeromefroe made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/4180
- @mohamedawnallah made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/4198
- @mountcount made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/4183
- @umakantv made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/4212
- @joshgarnett made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/4259
- @rajeshkarnena made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/4327
Full Changelog: https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.19.1...v2.20.0
下载链接
- grpc-gateway_2.20.0_checksums.txt
- multiple.intoto.jsonl
- protoc-gen-grpc-gateway-v2.20.0-darwin-arm64
- protoc-gen-grpc-gateway-v2.20.0-darwin-x86_64
- protoc-gen-grpc-gateway-v2.20.0-linux-arm64
- protoc-gen-grpc-gateway-v2.20.0-linux-x86_64
- protoc-gen-grpc-gateway-v2.20.0-windows-arm64.exe
- protoc-gen-grpc-gateway-v2.20.0-windows-x86_64.exe
- protoc-gen-openapiv2-v2.20.0-darwin-arm64
- protoc-gen-openapiv2-v2.20.0-darwin-x86_64
- protoc-gen-openapiv2-v2.20.0-linux-arm64
- protoc-gen-openapiv2-v2.20.0-linux-x86_64
- protoc-gen-openapiv2-v2.20.0-windows-arm64.exe
- protoc-gen-openapiv2-v2.20.0-windows-x86_64.exe