grpc-gateway v2.27.0 版本更新介绍
发布日期: 2025-06-17
版本号: v2.27.0
本次更新包含多项功能增强、错误修复及文档改进。主要变更包括:优化OpenAPI生成器,支持自定义服务名标签、参数路径转换为驼峰式命名,并新增
x-go-type标志支持;改进Bazel构建规则,显示--preserve_rpc_order选项;更新开发容器配置与工具安装说明;修复响应体处理、错误忽略及流方法资源清理等问题。此外,文档中补充了Issue #5241的相关内容,并为发布资产添加了源代码归档。
更新内容 (中文)
更新内容
- 由 @WwhdsOne 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5309 中添加了关于 Issue #5241 的文档
- 由 @Ccheers 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5278 中实现功能(protoc-gen-openapiv2/template):从字段行为更新swagger对象…
- 由 @johanbrandhorst 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5336 中更新开发容器
- 由 @lennrt 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5348 中实现功能(bazel):在规则定义中显示 –preserve_rpc_order 选项
- 由 @Shaxine 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5339 中实现功能:将用户定义的服务名称分配为方法标签
- 由 @rohitlohar45 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5340 中添加对 x-go-type 标志的支持
- 由 @johanbrandhorst 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5426 中修复Go工具安装说明
- 由 @johanbrandhorst 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5431 中明确GOBIN安装说明
- 由 @paskozdilar 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5331 中丢弃Unary和ClientStream方法未使用的请求体
- 由 @hharrisd 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5438 中将源代码归档添加到发布资产
- 由 @ndtretyak 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5510 中修复response_body
- 由 @iamrajiv 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5601 中修复(openapi):将冒号后的路径参数转换为
camelCase - 由 @huin 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5645 中修复(lint,gosec):显式忽略已丢弃的HTTP请求错误…
- 由 @johanbrandhorst 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5668 中修复protoc-gen-grpc-gateway:在清空时防止空指针异常
新贡献者
- @Ccheers 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5278 中做出了他们的首次贡献
- @lennrt 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5348 中做出了他们的首次贡献
- @Shaxine 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5339 中做出了他们的首次贡献
- @rohitlohar45 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5340 中做出了他们的首次贡献
- @hharrisd 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5438 中做出了他们的首次贡献
- @ndtretyak 在 https://github.com/grpc-ecosystem/grpc-gateway/pull/5510 中做出了他们的首次贡献
完整更新日志: https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.26.3...v2.26.4
更新内容 (原始)
What’s Changed
- Add docs about Issue #5241 by @WwhdsOne in https://github.com/grpc-ecosystem/grpc-gateway/pull/5309
- feat(protoc-gen-openapiv2/template): updateSwaggerObjectFromFieldBeha… by @Ccheers in https://github.com/grpc-ecosystem/grpc-gateway/pull/5278
- Update devcontainer by @johanbrandhorst in https://github.com/grpc-ecosystem/grpc-gateway/pull/5336
- feat(bazel): surface –preserve_rpc_order in rule def by @lennrt in https://github.com/grpc-ecosystem/grpc-gateway/pull/5348
- protoc-gen-openapiv2: Assign user-defined service name as method tag by @Shaxine in https://github.com/grpc-ecosystem/grpc-gateway/pull/5339
- Add support for x-go-type flag by @rohitlohar45 in https://github.com/grpc-ecosystem/grpc-gateway/pull/5340
- Fix go tool install instructions by @johanbrandhorst in https://github.com/grpc-ecosystem/grpc-gateway/pull/5426
- Make GOBIN instructions explicit by @johanbrandhorst in https://github.com/grpc-ecosystem/grpc-gateway/pull/5431
- Discard unused body of Unary and ClientStream methods by @paskozdilar in https://github.com/grpc-ecosystem/grpc-gateway/pull/5331
- Add the source archive to the release assets by @hharrisd in https://github.com/grpc-ecosystem/grpc-gateway/pull/5438
- Fix response_body by @ndtretyak in https://github.com/grpc-ecosystem/grpc-gateway/pull/5510
- fix(openapi): Convert path params after colon to
camelCaseby @iamrajiv in https://github.com/grpc-ecosystem/grpc-gateway/pull/5601 - fix(lint,gosec): explicitly ignore errors from discarded HTTP request… by @huin in https://github.com/grpc-ecosystem/grpc-gateway/pull/5645
- protoc-gen-grpc-gateway: guard against nil on drain by @johanbrandhorst in https://github.com/grpc-ecosystem/grpc-gateway/pull/5668
New Contributors
- @Ccheers made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/5278
- @lennrt made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/5348
- @Shaxine made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/5339
- @rohitlohar45 made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/5340
- @hharrisd made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/5438
- @ndtretyak made their first contribution in https://github.com/grpc-ecosystem/grpc-gateway/pull/5510
Full Changelog: https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.26.3...v2.26.4
下载链接
- grpc-gateway-v2.27.0.tar.gz
- grpc-gateway_2.27.0_checksums.txt
- multiple.intoto.jsonl
- protoc-gen-grpc-gateway-v2.27.0-darwin-arm64
- protoc-gen-grpc-gateway-v2.27.0-darwin-x86_64
- protoc-gen-grpc-gateway-v2.27.0-linux-arm64
- protoc-gen-grpc-gateway-v2.27.0-linux-x86_64
- protoc-gen-grpc-gateway-v2.27.0-windows-arm64.exe
- protoc-gen-grpc-gateway-v2.27.0-windows-x86_64.exe
- protoc-gen-openapiv2-v2.27.0-darwin-arm64
- protoc-gen-openapiv2-v2.27.0-darwin-x86_64
- protoc-gen-openapiv2-v2.27.0-linux-arm64
- protoc-gen-openapiv2-v2.27.0-linux-x86_64
- protoc-gen-openapiv2-v2.27.0-windows-arm64.exe
- protoc-gen-openapiv2-v2.27.0-windows-x86_64.exe