grpc-gateway v2.15.1 版本更新介绍
发布日期: 2023-02-22
版本号: v2.15.1
本次更新主要包含多项功能改进、问题修复及代码优化。新增功能包括在路径参数中支持
format
,更新默认头匹配器文档注释,调整部分错误处理逻辑使用%w
动词,以及为资源部分更新去除updateMask
字段生成。修复了YAML输出中的JSON示例问题、数组项类型缺失及非ASCII HTTP头处理错误。代码清理涉及删除冗余错误检查、统一Bazel构建文件名及优化日志格式。CI/CD方面添加了Go 1.20测试支持并升级了Buf版本。共有7位新贡献者参与本次更新,包括@warrenb95、@li31727、@rsepassi等首次提交代码的开发者。
更新内容 (中文)
更新内容
- 由 @warrenb95 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3092 清理
use_allof_for_refs
标志选项 - 由 @li31727 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3090 修复(#3049): 为数组添加元素类型声明
- 由 @hedhyw 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3106 修复: YAML输出中的JSON示例 [#3095]
- 由 @li31727 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3114 新增功能(3102): 更新
DefaultHeaderMatcher
函数注释文档 - 由 @rsepassi 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3117 将根目录
BUILD
重命名为BUILD.bazel
以保持一致性 - 由 @antgamdia 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3089 在路径参数中新增
format
支持 - 由 @sashamelentyev 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3129 修改格式化动词
- 由 @sashamelentyev 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3130 移除冗余错误检查并使用
%w
动词包装错误 - 由 @sashamelentyev 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3131 使用ifshort语句简化错误处理
- 由 @sashamelentyev 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3137 代码清理优化
- 由 @sashamelentyev 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3139 将
%v
替换为%q
格式化动词并进行代码优化 - 由 @csh995426531 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3093 修复: 部分资源更新时不再生成
updateMask
字段 - 由 @sashamelentyev 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3176 在CI矩阵中添加go1.20支持
- 由 @paulburlumi 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3184 更新README.md
- 由 @torkelrogstad 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3190 将
Dial
改为DialContext
- 由 @torkelrogstad 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3189 升级Buf版本
- 由 @steinarvk-oda 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3197 修复非ASCII HTTP头处理问题
新贡献者
- @warrenb95 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3092 提交了首次贡献
- @li31727 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3090 提交了首次贡献
- @rsepassi 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3117 提交了首次贡献
- @antgamdia 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3089 提交了首次贡献
- @csh995426531 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3093 提交了首次贡献
- @paulburlumi 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3184 提交了首次贡献
- @steinarvk-oda 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/3197 提交了首次贡献
完整变更日志: https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.15.0…v2.15.1
更新内容 (原始)
What’s Changed
- Clean up use_allof_for_refs flag option by @warrenb95 in https://github.com/grpc-ecosystem/grpc-gateway/pull/3092
- fix(#3049):add items type for array by @li31727 in https://github.com/grpc-ecosystem/grpc-gateway/pull/3090
- fix: JSON examples in YAML output [#3095] by @hedhyw in https://github.com/grpc-ecosystem/grpc-gateway/pull/3106
- feat(3102):update DefaultHeaderMatcher function comment docs by @li31727 in https://github.com/grpc-ecosystem/grpc-gateway/pull/3114
- Rename root BUILD to BUILD.bazel for consistency by @rsepassi in https://github.com/grpc-ecosystem/grpc-gateway/pull/3117
- Add
format
in path params by @antgamdia in https://github.com/grpc-ecosystem/grpc-gateway/pull/3089 - Change verb by @sashamelentyev in https://github.com/grpc-ecosystem/grpc-gateway/pull/3129
- Remove redundant err and use %w verb for err by @sashamelentyev in https://github.com/grpc-ecosystem/grpc-gateway/pull/3130
- Use ifshort stmt for err by @sashamelentyev in https://github.com/grpc-ecosystem/grpc-gateway/pull/3131
- Cleanup by @sashamelentyev in https://github.com/grpc-ecosystem/grpc-gateway/pull/3137
- Change ‘%v’ with %q verb and small cleanup by @sashamelentyev in https://github.com/grpc-ecosystem/grpc-gateway/pull/3139
- fix: Partial resource update, no longer generate updateMask field by @csh995426531 in https://github.com/grpc-ecosystem/grpc-gateway/pull/3093
- Add go1.20 to ci matrix by @sashamelentyev in https://github.com/grpc-ecosystem/grpc-gateway/pull/3176
- Update README.md by @paulburlumi in https://github.com/grpc-ecosystem/grpc-gateway/pull/3184
- gateway: Dial -> DialContext by @torkelrogstad in https://github.com/grpc-ecosystem/grpc-gateway/pull/3190
- Buf version bump by @torkelrogstad in https://github.com/grpc-ecosystem/grpc-gateway/pull/3189
- Fix bug with non-ASCII HTTP headers by @steinarvk-oda in https://github.com/grpc-ecosystem/grpc-gateway/pull/3197
New Contributors
- @warrenb95 made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/3092
- @li31727 made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/3090
- @rsepassi made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/3117
- @antgamdia made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/3089
- @csh995426531 made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/3093
- @paulburlumi made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/3184
- @steinarvk-oda made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/3197
Full Changelog: https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.15.0...v2.15.1
下载链接
- grpc-gateway_2.15.1_checksums.txt
- multiple.intoto.jsonl
- protoc-gen-grpc-gateway-v2.15.1-darwin-arm64
- protoc-gen-grpc-gateway-v2.15.1-darwin-x86_64
- protoc-gen-grpc-gateway-v2.15.1-linux-arm64
- protoc-gen-grpc-gateway-v2.15.1-linux-x86_64
- protoc-gen-grpc-gateway-v2.15.1-windows-arm64.exe
- protoc-gen-grpc-gateway-v2.15.1-windows-x86_64.exe
- protoc-gen-openapiv2-v2.15.1-darwin-arm64
- protoc-gen-openapiv2-v2.15.1-darwin-x86_64
- protoc-gen-openapiv2-v2.15.1-linux-arm64
- protoc-gen-openapiv2-v2.15.1-linux-x86_64
- protoc-gen-openapiv2-v2.15.1-windows-arm64.exe
- protoc-gen-openapiv2-v2.15.1-windows-x86_64.exe