microsoft / microsoft/AdaptiveCards
Template warnings only consist of invalid '$when' conditions
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
Problem
The behavior of the Template.getLastTemplateExpansionWarnings() function differs from other SDKs, such as the .NET WPF SDK. Currently, the list of warnings returned contains only warnings related to $when conditions, with no other types of warnings being included.
Upon reviewing the source code, it appears that the templateExpansionWarnings array is only populated for invalid $when conditions. However, the description for this array states that it "stores any warnings that occurred while expanding the template," which does not align with the current implementation.
Expected behavior
To resolve this, either the list of warnings should be expanded to include other types of warnings, or the behavior should be documented to clarify that only $when conditions are currently reported. As it stands, the current implementation is misleading.
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 with Template.getLastTemplateExpansionWarnings() and the templateExpansionWarnings array described in the issue. Review how warnings are collected during template expansion and compare the current contract with the referenced .NET WPF SDK behavior. Done means the implementation or documentation clearly matches the supported warning behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100