AdaptiveChars v1.2架构更新

时间:2019-06-06 00:13:17

标签: json adaptive-cards

我看到AdaptiveCards v1.2.0是几天前发布的。它被描述为实现ChoiceSet的“ wrap”属性;但是,我在下载的程序包的架构中看不到此属性。我们能否确认这实际上是在1.2中实现并且可以正常工作?由于其他承诺,我无法对此进行测试,但是正在与需要此属性的客户一起工作。 这是低于1.2版本的项目#14: https://github.com/microsoft/AdaptiveCards/releases/tag/v1.2.0

在1.2.0源代码中,这是来自schemas / adaptive-card.json的ChoiceSet的模式:

        "Input.ChoiceSet": {
            "additionalProperties": true,
            "type": "object",
            "description": "Allows a user to input a Choice.",
            "allOf": [
                {
                    "$ref": "#/definitions/CardElement"
                }
            ],
            "properties": {
                "choices": {
                    "type": "array",
                    "description": "`Choice` options.",
                    "items": {
                        "$ref": "#/definitions/Input.Choice"
                    }
                },
                "id": {
                    "type": "string",
                    "description": "Unique identifier for the value. Used to identify collected input when the Submit action is performed."
                },
                "isMultiSelect": {
                    "type": "boolean",
                    "description": "Allow multiple choices to be selected.",
                    "default": false
                },
                "style": {
                    "$ref": "#/definitions/ChoiceInputStyle"
                },
                "type": {
                    "description": "Must be `\"Input.ChoiceSet\"`.",
                    "enum": [
                        "Input.ChoiceSet"
                    ],
                    "type": "string"
                },
                "value": {
                    "type": "string",
                    "description": "The initial choice (or set of choices) that should be selected. For multi-select, specify a comma-separated string of values."
                }
            },
            "required": [
                "type",
                "id",
                "choices"
            ]
        },

我在这里没有看到“包装”属性。

2 个答案:

答案 0 :(得分:0)

Microsoft Teams当前不支持Adaptive Cards 1.2。

答案 1 :(得分:0)

感谢您对此进行询问。这是自适应卡团队的安德鲁。

您在6月初回想的架构文件似乎是旧的1.1架构。当时我们可能还没有发布1.2模式。

这是新的1.2模式,实际上在wrap上确实有Input.ChoiceSethttps://adaptivecards.io/schemas/1.2.0/adaptive-card.json

此外,在我们的文档中,您可以看到wrap属性:https://adaptivecards.io/explorer/Input.ChoiceSet.html

让我们知道您是否还有其他疑问!