【问题标题】:Where is the JSON schema for Slack Block Kit?Slack Block Kit 的 JSON 模式在哪里?
【发布时间】:2020-09-30 17:18:44
【问题描述】:

block kit builder (slack.com) 能够验证 json 输入,因此架构在某处可用:

但是我在 Slack 文档中找到的 schema (github.com) 没有对块的定义:

        "blocks": {
        "description": "This is a very loose definition, in the future, we'll populate this with deeper schema in this definition namespace.",
        "items": {
            "additionalProperties": true,
            "properties": {
                "type": {
                    "type": "string"
                }
            },
            "required": [
                "type"
            ],
            "type": "object"
        },
        "title": "Block Kit blocks",
        "type": "array"
    },

那么,这在任何地方都可以使用吗?

谢谢

【问题讨论】:

    标签: slack jsonschema slack-api


    【解决方案1】:

    我不认为现在任何地方都可以使用块模式。 Slack 的 github repo 上有一个待处理的issue,它谈到了完全相同的问题。最后一次官方回复是一年多前发出的。

    【讨论】:

    • 天哪,我将不得不从块工具包构建器中提取验证码
    • 我希望它出现在客户端。为了验证,块工具包构建器似乎正在向/api/blocks.format 端点发出请求。此端点将有效负载与架构进行比较,如果有则返回错误。
    • 啊!那真是太可惜了。不过还是谢谢你@JaiPandya :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-12-12
    • 1970-01-01
    • 1970-01-01
    • 2022-08-11
    • 2022-10-31
    • 1970-01-01
    • 2022-06-28
    相关资源
    最近更新 更多