Skip to content

Make images required for Thumbnail#216

Merged
heyitsaamir merged 10 commits into
mainfrom
aamirj/MEFix
Nov 21, 2025
Merged

Make images required for Thumbnail#216
heyitsaamir merged 10 commits into
mainfrom
aamirj/MEFix

Conversation

@heyitsaamir

Copy link
Copy Markdown
Collaborator

Thumbnails should have images be a required field. Without them, thumbnails scenario don't really work.

Technically it's nullable, so we allow it, but it should be explicitly specified that it's nullable.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 makes the images field required for ThumbnailCard by overriding the parent class's optional default. While the field remains nullable (can be explicitly set to None), users must now consciously provide a value rather than relying on an implicit default. The changes update the model definition and all example usage to explicitly specify image data.

Key changes:

  • Modified ThumbnailCard to require explicit images field specification using Pydantic's Field(...)
  • Updated example code to explicitly construct ThumbnailCard objects with image data
  • Added image data to thumbnail dictionaries in example card creation functions

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/api/src/microsoft/teams/api/models/card/thumbnail_card.py Overrides images field from BasicCard to make it required (but nullable) using Field(...), forcing explicit specification
packages/api/src/microsoft/teams/api/models/attachment/card_attachment.py Removes trailing comment markers from content_type definitions (whitespace cleanup)
examples/message-extensions/src/main.py Updates import organization, explicitly constructs ThumbnailCard with validation, and changes attachment layout to GRID
examples/message-extensions/src/cards.py Adds explicit images array to thumbnail data dictionaries to satisfy new requirement

Comment thread examples/message-extensions/src/main.py
@heyitsaamir
heyitsaamir merged commit 7225b7a into main Nov 21, 2025
12 checks passed
@heyitsaamir
heyitsaamir deleted the aamirj/MEFix branch November 21, 2025 23:44
This was referenced Nov 22, 2025
lilyydu added a commit that referenced this pull request Nov 22, 2025
## Release 2.0.0a6

### Changes

- Make images required for Thumbnail (#216)
- Revert "Add comment"
- Add comment
- Move tests to examples (#199)
- Bump glob from 11.0.3 to 11.1.0 in /tests/tab/Web (#215)
- Remove Agents class (#213)
- Add signin/failure invoke activity support (#206)
- Update config.yml (#214)
- Adds a github template when New issues are created  (#212)
- feat: add OAuth support for regional bots (#209)
- [feat] Add BotBuilder Plugin package, sample and tests (#190)

Co-authored-by: lilydu <[email protected]>
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.

3 participants