slackLists.items.list: LinkField originalUrl/displayName are always null (response uses camelCase keys)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
问题出在 ListRecord.LinkField 的反序列化方式上:它的字段使用 snake_case 命名,而 slackLists.items.list 返回的是 camelCase 键。请从模型中的 LinkField 类开始,检查它带有哪些 @SerializedName 注解,然后用包含 originalUrl 和 displayName 的 JSON 固定数据复现问题。完成标准是:getOriginalUrl() 和 getDisplayName() 返回固定数据中的值,并且现有的 create/update 请求结构仍然按 snake_case 序列化。
由索引模型根据 Issue 内容生成。
描述
Summary
slackLists.items.list returns link cells with camelCase keys (originalUrl, displayAsUrl, displayName), but ListRecord.LinkField is deserialized with the SDK's snake_case naming, so it expects original_url, display_as_url and display_name. As a result, every LinkField read back from a list has originalUrl == null and displayName == null.
Writing works: slackLists.items.create and slackLists.items.update accept the snake_case request shape that the SDK sends.
Reproduce
- Create a list with a
linkcolumn and add a row whose link cell hasoriginal_urlanddisplay_name(through the SDK). - Call
slackLists.items.listthroughMethodsClient#slackListsItemsList. - For the link field of the row:
field.getLink().get(0).getOriginalUrl()isnull.field.getValue()holds the link as JSON with camelCase keys, for example:
{"originalUrl":"https://github.com/org/repo/pull/7","attachment":{},"displayAsUrl":false,"displayName":"repo#7"}
Expected
getOriginalUrl() and getDisplayName() return the values Slack sent, for example with @SerializedName(value = "original_url", alternate = "originalUrl") on the LinkField fields.
Versions
com.slack.api:slack-api-clientandslack-api-model1.51.0- Java 25
- 主要语言
- Java
- 星标
- 602
- 派生
- 239
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 18
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
slackapi/java-slack-sdk 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
slackapi/java-slack-sdk#1653 · 2 条评论 ·
维护者通常 1 天内回复
-
enhancement project:slack-api-model
难度 3/5 半天 新手友好度 75/100
slackapi/java-slack-sdk#1657 · 2 条评论 ·
维护者通常 1 天内回复
-
Upgrade Jetty可能已有人在做 @skrcode 于 69 天前认领。 未关闭auto-triage-skip dependencies good first issue
难度 4/5 3-5 天 新手友好度 45/100
slackapi/java-slack-sdk#1567 · 4 条评论 ·
维护者通常 1 天内回复
-
auto-triage-skip discussion enhancement
难度 3/5 1-2 天 新手友好度 35/100
slackapi/java-slack-sdk#1535 · 5 条评论 ·
维护者通常 1 天内回复
-
auto-triage-skip question untriaged
难度 5/5 一周以上 新手友好度 25/100
slackapi/java-slack-sdk#1528 · 7 条评论 ·
维护者通常 1 天内回复
查看 slackapi/java-slack-sdk 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 85/100
hibernate/hibernate-reactive#4485 ·
维护者通常 1 天内回复
-
type: dependency-upgrade
难度 2/5 1-3 小时 新手友好度 61/100
spring-projects/spring-graphql#1556 ·
-
hermes-queue
难度 1/5 1 小时以内 新手友好度 91/100
chrisalunlloyd2-sudo/mindpalace#373 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug priority: lowest
难度 2/5 1-3 小时 新手友好度 62/100
SkriptLang/Skript#8953 · 1 条评论 ·
维护者通常 1 天内回复