Skip to content

Update Adaptive Cards package#316

Open
corinagum wants to merge 10 commits intomainfrom
cg/ac-gen-versionfix
Open

Update Adaptive Cards package#316
corinagum wants to merge 10 commits intomainfrom
cg/ac-gen-versionfix

Conversation

@corinagum
Copy link
Contributor

@corinagum corinagum commented Mar 18, 2026

  • Fixes [Bug]: Adaptive cards not render on Android #238 - default version 1.5 will be applied to payload
  • Updated generated Adaptive Cards core file (core.py) from latest codegen output (03/18/2026)
  • Reapplied manual changes on top of generated code:
  • Marked IMBackAction, InvokeAction, MessageBackAction, SignInAction, and TaskFetchAction with DeprecationWarning, pointing to their generated replacements
  • Other default values added: isEnabled, action mode defaults to "primary", action style "default, requires defaults to new HostCapabilities.
  • msteams added to several types: AdaptiveCard, SubmitAction, Image, SubmitActionData
  • ExecuteAction.data: Union[str, Dict[str, Any], SubmitActionData] changed to Union[str, SubmitActionData] (dropped dict)

Copilot AI review requested due to automatic review settings March 18, 2026 23:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the microsoft-teams-cards Adaptive Cards generated core models to the latest codegen output (03/18/2026), reapplies repo-specific serialization/validation aliasing, introduces deprecation warnings for legacy action helper classes, and changes the default Adaptive Card schema version to 1.5 (to address #238).

Changes:

  • Regenerated cards/core.py with new/updated Adaptive Card model types, defaults, and helpers (including default AdaptiveCard.version = "1.5").
  • Reapplied custom alias behavior (ms_teamsmsteams, choices_datachoices.data) and kept the SubmitActionData.with_data helper.
  • Added runtime DeprecationWarning to legacy action classes (IMBackAction, InvokeAction, MessageBackAction, SignInAction, TaskFetchAction) pointing to generated replacements.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/cards/src/microsoft_teams/cards/core.py Updated generated Adaptive Cards core models; aliasing logic; default AdaptiveCard.version change; new/modified types.
packages/cards/src/microsoft_teams/cards/actions/task_fetch_action.py Adds deprecation warning for TaskFetchAction.
packages/cards/src/microsoft_teams/cards/actions/sign_in_action.py Adds deprecation warning for SignInAction.
packages/cards/src/microsoft_teams/cards/actions/message_back_action.py Adds deprecation warning for MessageBackAction.
packages/cards/src/microsoft_teams/cards/actions/invoke_action.py Adds deprecation warning for InvokeAction.
packages/cards/src/microsoft_teams/cards/actions/im_back_action.py Adds deprecation warning for IMBackAction.

@corinagum corinagum force-pushed the cg/ac-gen-versionfix branch from dfc6252 to 8711ede Compare March 19, 2026 22:25
Copy link
Contributor Author

@corinagum corinagum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments/questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Adaptive cards not render on Android

3 participants