Skip to content

Commit 574ae5b

Browse files
committed
fixed schema $ error
1 parent c05e19a commit 574ae5b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

webexteamssdk/cards/card.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,18 @@ def __init__(self, body=None,
6868
self.selectAction = selectAction
6969
self.fallbackText = fallbackText
7070
self.lang = lang
71-
self.schema = "http://adaptivecards.io/schemas/adaptive-card.json"
7271

7372
super().__init__(serializable_properties=[
7473
'body', 'actions', 'selectAction'
7574
],
7675
simple_properties=[
77-
'version', 'fallbackText', 'lang', 'schema', 'type'
76+
'version', 'fallbackText', 'lang', 'type'
7877
])
78+
def to_dict(self):
79+
# We need to overwrite the to_dict method to add the $schema
80+
# property that can't be specified the normal way due to the
81+
# $ in the beginning
82+
ret = super().to_dict()
83+
ret["$schema"] = "http://adaptivecards.io/schemas/adaptive-card.json"
84+
85+
return ret

0 commit comments

Comments
 (0)