bufbuild/es: enable json_types=true in generated SDKs
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #2891 来自 @saefty —— 已关闭,未合并
评估
- 难度
- 1/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- typescript
调研方向
Find the bufbuild/es plugin configuration that sets registry.opts for generated npm SDKs and read the surrounding versioning conventions. Add json_types=true as proposed, then verify the next generated SDK's .d.ts files include JSON message types while .js output stays unchanged. Pull request #2891 is already open for this issue.
由索引模型根据 Issue 内容生成。
描述
The generated npm SDKs of buf.build/bufbuild/es are built with registry.opts: [import_extension=js]. protoc-gen-es v2 also has the option json_types=true, which adds a type for the JSON form of every message. Users of the generated SDKs cannot set plugin options, so they never get these types.
Use case: HTTP APIs that use the protobuf JSON mapping instead of gRPC. A client that only needs types for the JSON it receives has to derive them itself or run buf generate.
Effect: The .js output does not change. The .d.ts files gain the JSON types. toJson() without options returns the message's JSON type instead of JsonValue, so code that annotates the result as JsonValue may no longer compile.
Proposed change: add json_types=true to registry.opts of the next bufbuild/es version.
- 主要语言
- Dockerfile
- 星标
- 75
- 派生
- 27
- 平均合并
- 5 小时 35 分钟
- 30 天内合并 PR
- 52
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bufbuild/plugins 的其他 Issue
-
Unexpected Fetch latest versions failure可能已有人在做 @pkwarren 于 12 天前认领。 未关闭Bug
bufbuild/plugins#2899 · 已指派 3 人 ·
维护者通常 1 天内回复
-
Plugin request for Buf Schema Registry: protoc-gen-connect-php可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 48/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 55/100
维护者通常 1 天内回复
-
Feature Plugin Request
难度 4/5 3-5 天 新手友好度 35/100
bufbuild/plugins#2255 · 1 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
bug platform-desktop
难度 2/5 1-3 小时 新手友好度 82/100
Termix-SSH/Plugin-Tmux-Monitor#36 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
melgarafael/DeskcommCRM#5614 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
rmosolgo/graphql-ruby#5918 ·
维护者通常 1 天内回复
-
bug p360
难度 2/5 1-3 小时 新手友好度 74/100
navikt/crm-arbeidsforhold#1339 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复