matthidinger / ContosoScubaBot

Sample bot built with rich Adaptive Cards
https://contososcubademo.azurewebsites.net
MIT License
40 stars 36 forks source link

Validation of AdaptiveCard #8

Closed vovanb closed 6 years ago

vovanb commented 6 years ago

In your example the validation done in c# code in each card. For example GetErrorMessage in next card raise error. Is exist any possible workaround to have validation in JSON instead of compiled code? Similar as in MS bot framework it is done in JSON schema: https://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-formflow-json-schema

vovanb commented 6 years ago

any update?

EricDahlvang commented 6 years ago

Hi @vovanb

FormFlow is specifically built on top of the .NET Bot Builder sdk, and was created with validation as part of the architecture. Adaptive Cards are a separate library defining a schema and standard for control and layout across various UI clients. Bots are just one of the consumers of Adaptive Cards. It would be possible to create a json based validation library that uses reflection on top of .net Adaptive Cards. It might be a lot of work though.