microsoft / microsoft/AdaptiveCards

[Designer] The payload editor warns of missing version property in nested cards

Open
#9,144 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Designer Bug
Dominant language
C#
Stars
2k
Forks
595
Avg merge
1d 19h
Merged PRs (30d)
1

Description

Problem Description

Using the activity update sample from https://adaptivecards.io/samples/ActivityUpdate.html, the designer shows an error in the JSON:

Image

However, the spec states that version is optional for cards nested within Action.ShowCard. I suppose this is a side-effect of using the JSON schema to validate the code in the editor. The fact that an official sample (the first one to be listed at that) shows up as invalid in the official editor seems rather unfortunate.

Card JSON
{
    "type": "AdaptiveCard",
    "actions": [
        {
            "type": "Action.ShowCard",
            "title": "Set due date",
            "card": {
                "type": "AdaptiveCard",
                "actions": [
                    {
                        "type": "Action.Submit",
                        "title": "OK"
                    }
                ]
            }
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.6"
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ActivityUpdate sample linked in the issue and reproduce the warning in the Designer using the provided card JSON. Trace the editor's JSON-schema validation for the nested Action.ShowCard card and compare it with the adaptive-card.json schema and explorer specification. Done means the official sample validates without incorrectly requiring version on the nested card.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.