microsoft / microsoft/teams.ts
[cards] support lowercase and Capitalized JSON values
- Dominant language
- TypeScript
- Stars
- 107
- Forks
- 39
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 74
Description
Currently, the official [Adaptive Cards Designer](https://adaptivecards.microsoft.com/designer.html) uses enum values for validating the JSON, meaning that `spacing: "left"` will cause a linter warning in the AC designer but `spacing: "Left"` will pass.
In the old Adaptive Cards designer, all lowercase values were supported as opposed to capitalized values, which is part of why the cards package lints for lowercase.
Ultimately, either works - capitalized or lowercase, either/both will successfully be rendered in Teams over the wire, but to avoid confusion for the conflicting linter messages, this SDK should support both. (This is why the work item is lower priority)
Adaptive Cards Designer, lowercase:

AC Designer, capitalized:

Linter when using `ICard` from `cards` package:

Contributor guide
Research direction
Start by locating the cards package definitions for ICard and the enum values used in its JSON validation. Check any existing cards tests for lowercase values, then add coverage for both lowercase and capitalized forms; done means both forms pass validation without linter warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100