You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working to implement support for #205 I spent some time reviewing the current codebase. I looked for places to work in the new support without breaking existing logic. During this work, I found issues with the current validation logic.
The validation logic is intended to flow from the adaptivecard.Message entry point to all associated types like so:
What should occur is a call to validate Attachment.Content. This in turn should validate all required fields and trigger validation of any associated types downwards or outwards so that everything that should be validated is validated.
The text was updated successfully, but these errors were encountered:
Restore validation logic "chain" by adding missing validation
step. By adding this step, the validation logic can continue
"downwards" or "outwards" to associated types as intended.
NOTE: This change does not affect the ability to disable
validation entirely if requested by client code.
refs GH-208
Overview
While working to implement support for #205 I spent some time reviewing the current codebase. I looked for places to work in the new support without breaking existing logic. During this work, I found issues with the current validation logic.
The validation logic is intended to flow from the
adaptivecard.Message
entry point to all associated types like so:Message
Attachments
([]Attachments
)Attachment
Content
(TopLevelCard
)Card
Body
([]Element
)Element
Unfortunately, validation breaks down here:
Message
Attachments
([]Attachments
)Attachment
go-teams-notify/adaptivecard/adaptivecard.go
Lines 906 to 918 in 9282fe2
What should occur is a call to validate
Attachment.Content
. This in turn should validate all required fields and trigger validation of any associated types downwards or outwards so that everything that should be validated is validated.The text was updated successfully, but these errors were encountered: