-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema cleanup and validation #3758
Conversation
tomlm
commented
Apr 17, 2020
- moved dialogManager into dialogs assembly
- cleanup input schema and comments
- Add unit tests for validating dialogs/schema (!!!)
- fix a bunch of schema errors
- fix a bunch of dialog errors
- move compnent schema to using botframework-sdk/component.schema
- get rid of sdk.schema, schema comes from SDK assemblies not from sdk.schema
- create tests.schema which is active schema for unit tests
- create testbot.schema which is active schema for testbot
renamed Ask.ExpectedOperation to Ask.DefaultOperation
* fix a bunch of schema errors * fix a bunch of dialog errors * move compnent schema to using botframework-sdk/component.schema * get rid of sdk.schema, schema comes from SDK assemblies not from sdk.schema * create tests.schema which is active schema for unit tests * create testbot.schema which is active schema for testbot
@@ -26,7 +26,7 @@ public static void ClassInitialize(TestContext context) | |||
{ | |||
ResourceExplorer = new ResourceExplorer() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you intend to remove this file? #Closed
// string output = process.StandardOutput.ReadToEnd(); | ||
|
||
var process = Process.Start(startInfo); | ||
string error = process.StandardError.ReadToEnd(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var
[DynamicData(nameof(Dialogs))] | ||
public async Task TestDialogResourcesAreValidForSchema(IResource resource) | ||
{ | ||
FileResource fileResource = resource as FileResource; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var
|
||
public override Task<DialogTurnResult> BeginDialogAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
{ | ||
var (arg1, err1) = Expression.Parse(Arg1).TryEvaluate(dc.State); | ||
var (arg2, err2) = Expression.Parse(Arg2).TryEvaluate(dc.State); | ||
var arg1 = Arg1.GetValue(dc.State); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace picked up by tool
* boolProperty => false * numberProperty = 0 * integerProperty =0 Ordered so default form is first OneOf() array * BoolProperty => default is bool * NumberProperty => default is number * Condition => default is string with pattern * StringExpression => default is string etc. * add checks for $schema exists and is correct. * fix up all $schema files.
libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.BeginDialog.schema
Show resolved
Hide resolved
...aries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.DeleteActivity.schema
Show resolved
Hide resolved
libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EditActions.schema
Outdated
Show resolved
Hide resolved
libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Actions/Microsoft.EmitEvent.schema
Show resolved
Hide resolved
libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Dialogs/Microsoft.DateTimeInput.schema
Outdated
Show resolved
Hide resolved
libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Dialogs/Microsoft.DateTimeInput.schema
Show resolved
Hide resolved
libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Dialogs/Microsoft.InputDialog.json
Show resolved
Hide resolved
libraries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Dialogs/Microsoft.InputDialog.json
Show resolved
Hide resolved
...aries/Microsoft.Bot.Builder.Dialogs.Adaptive/Schemas/Dialogs/Microsoft.QnAMakerDialog.schema
Outdated
Show resolved
Hide resolved
...oft.Bot.Builder.Dialogs.Adaptive/Schemas/Recognizers/Microsoft.AdaptiveCardRecognizer.schema
Show resolved
Hide resolved
...osoft.Bot.Builder.Dialogs.Adaptive/Schemas/Templates/Microsoft.StaticActivityTemplate.schema
Show resolved
Hide resolved
...icrosoft.Bot.Builder.Dialogs.Adaptive/Schemas/TriggerConditions/Microsoft.OnCondition.schema
Outdated
Show resolved
Hide resolved
...oft.Bot.Builder.Dialogs.Adaptive/Schemas/TriggerConditions/Microsoft.OnInvokeActivity.schema
Show resolved
Hide resolved
Two major things:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we close this PR and break it into smaller PRs that are possible to review. The size of this PR, and the mixture of work, makes it really hard to tell what this is. |