microsoft / microsoft/AdaptiveCards
[Authoring] AdaptiveCard XmlAttributes are wrong on new 1.4 card elements (DotNet)
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Target Application
DotNet
Problem Description
XmlAttributes are missing or wrong
Card.Refresh.UserIds shouldn't be serialized if null
Action.Execute Data serializes as JSON instead of XML.
<?xml version="1.0" encoding="utf-8"?>
<Card xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Version Major="1" Minor="4" />
<TextBlock Size="ExtraLarge" Weight="Bolder" HorizontalAlignment="Center" Wrap="true">Super Deluxe Dice Roller</TextBlock>
<Image Size="Large" Url="https://dice-card.azurewebsites.net/images/dice${DiceValue}.png" HorizontalAlignment="Center" />
<ActionSet>
<Action.Execute Title="Roll" Verb="roll">{
"type": "adaptiveCard/action",
"id": "${documentId}",
"verb": "roll"
}</Action.Execute>
</ActionSet>
<Refresh UserIds="">
<Action Title="Refresh" Verb="refresh">{
"type": "adaptiveCard/action",
"id": "${documentId}",
"verb": "refresh"
}</Action>
</Refresh>
</Card>
Expected Outcome
<?xml version="1.0" encoding="utf-8"?>
<Card xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Version Major="1" Minor="4" />
<TextBlock Size="ExtraLarge" Weight="Bolder" HorizontalAlignment="Center" Wrap="true">Super Deluxe Dice Roller</TextBlock>
<Image Size="Large" Url="https://dice-card.azurewebsites.net/images/dice${DiceValue}.png" HorizontalAlignment="Center" />
<ActionSet>
<Action.Execute Title="Roll" Verb="roll">
<Data id="${documentId}" verb="roll" />
</Action.Execute>
</ActionSet>
<Refresh>
<Action Title="Refresh" Verb="refresh">
<Data id="${documentId}" verb="roll" />
</Action>
</Refresh>
</Card>
Actual Outcome
Please describe what was the actual outcome
Repro Steps
Please enter the steps to reproduce the issue
Schema Version
What JSON Schema Version are you targeting?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the .NET authoring XML serialization for Card.Refresh and Action.Execute, since no source files or tests are named. Compare the current output with the expected XML: null Refresh.UserIds should be omitted, and action data should be emitted as a Data element rather than JSON text. Done means the stated 1.4 elements serialize to the expected structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100