Search code examples
jsonadaptive-cards

AdaptiveChars v1.2 Schema Updates


I see AdaptiveCards v1.2.0 was released a few days ago. It is described as having implemented the "wrap" property for ChoiceSet; however, I don't see this property in the schema of the downloaded package. Can we get confirmation that this was in-fact implemented in 1.2 and working? I've not been able to test this out due to other commitments, but am working with a customer who is needing this property. This is item #14 on the below 1.2 release: https://github.com/microsoft/AdaptiveCards/releases/tag/v1.2.0

In the 1.2.0 source, here is the schema for ChoiceSet from schemas/adaptive-card.json:

        "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"
            ]
        },

I don't see the "wrap" property listed here.


Solution

  • thanks for asking about this. This is Andrew from the Adaptive Cards team.

    The schema file you were looking at back at the beginning of June seems to be the old 1.1 schema. It's possible we didn't have the 1.2 schema published yet at that time.

    Here's the new 1.2 schema, which indeed does have wrap on Input.ChoiceSet: https://adaptivecards.io/schemas/1.2.0/adaptive-card.json

    Also, on our docs, you can see the wrap property: https://adaptivecards.io/explorer/Input.ChoiceSet.html

    Let us know if you have any further questions!