Oneof toObject loses case
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- api
调研方向
从 protoc-grpc-web 生成的类及其 toObject() 转换开始,并以 issue #675 中描述的行为作为复现参考。完成的标准是,普通对象只包含活动 oneof 情况下定义的属性,而不是为每种情况都包含具有默认值的属性。
由索引模型根据 Issue 内容生成。
描述
What version of protobuf and what language are you using?
Version: master/v3.6.0/v3.5.0 etc.
Language: Javascript
What operating system Linux, Windows and version?
What runtime / compiler are you using (e.g., python version or gcc version)
What did you do?
Steps to reproduce the behavior:
generated classes and methods via protoc-grpc-web result in oneof losing its case when converted to a plain object by toObject()
See https://github.com/grpc/grpc-web/issues/675 for details
What did you expect to see
The result object to only have one defined property for the oneof case
What did you see instead?
All of the oneof cases are generated in the result plain object with their type default values
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
Anything else we should know about your project / environment
- 主要语言
- JavaScript
- 星标
- 471
- 派生
- 91
- 平均合并
- 3 小时 57 分钟
- 30 天内合并 PR
- 2
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
protocolbuffers/protobuf-javascript 的其他 Issue
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 30/100
protocolbuffers/protobuf-javascript#248 · 1 条评论 · 13 个 reaction ·
-
question
难度 3/5 1-2 天 新手友好度 45/100
protocolbuffers/protobuf-javascript#222 · 9 条评论 ·
-
enhancement port-fix triaged
难度 4/5 3-5 天 新手友好度 35/100
protocolbuffers/protobuf-javascript#185 · 1 条评论 ·
-
enhancement port-fix triaged
难度 4/5 3-5 天 新手友好度 35/100
protocolbuffers/protobuf-javascript#182 · 3 条评论 · 1 个 reaction ·
查看 protocolbuffers/protobuf-javascript 的全部 Issue
相似的 Issue
-
code-quality refactoring
难度 2/5 1-3 小时 新手友好度 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
难度 2/5 1-3 小时 新手友好度 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
难度 2/5 1-3 小时 新手友好度 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 88/100