Skip to content
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

Update Microsoft.BeginDialog.schema #3801

Merged
merged 4 commits into from
Apr 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,21 @@
]
},
"dialog": {
"$kind": "Microsoft.IDialog",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"$kind": "Microsoft.IDialog", [](start = 11, length = 30)

Woops, my bad, you need to keep the $kind, so should be

   "dialog": {
             "$kind": "Microsoft.IDialog",
            "$ref": "[https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/definitions.schema#/definitions/resourceExpression](https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/definitions.schema#/definitions/resourceExpression)",
            "title": "Dialog name",
            "description": "Name of the dialog to call.",
            "examples": [
                "AddToDoDialog"
            ]
        },

"$role": "expression",
"pattern": "^.*\\S.*",
"oneOf": [
{
"$kind": "Microsoft.IDialog",
"pattern": "^(?!(=)).*",
"title": "Dialog"
},
{
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/definitions.schema#/definitions/equalsExpression",
"examples": [
"=settings.dialogId"
]
}
],
"title": "Dialog name",
"description": "Name of the dialog to call.",
"examples": [
"AddToDoDialog"
]
"description": "Name of the dialog to call."
},
"options": {
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/definitions.schema#/definitions/objectExpression",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,21 @@
]
},
"dialog": {
"$kind": "Microsoft.IDialog",
"$role": "expression",
"type": "string",
"oneOf": [
{
"$kind": "Microsoft.IDialog",
"pattern": "^(?!(=)).*",
"title": "Dialog"
},
{
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/definitions.schema#/definitions/equalsExpression",
"examples": [
"=settings.dialogId"
]
}
],
"title": "Dialog name",
"description": "Name of the dialog to call.",
"examples": [
"AddToDoDialog"
]
"description": "Name of the dialog to call."
},
"options": {
"$ref": "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/definitions.schema#/definitions/objectExpression",
Expand Down
260 changes: 244 additions & 16 deletions tests/Microsoft.Bot.Builder.TestBot.Json/testbot.schema
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
"description": "Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.",
"$ref": "#/definitions/Microsoft.CancelAllDialogs"
},
{
"title": "Microsoft.CancelDialog",
"description": "Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.",
"$ref": "#/definitions/Microsoft.CancelDialog"
},
{
"title": "Microsoft.ChoiceInput",
"description": "Collect information - Pick from a list of choices",
Expand Down Expand Up @@ -1390,15 +1395,24 @@
]
},
"dialog": {
"$kind": "Microsoft.IDialog",
"$role": "expression",
"pattern": "^.*\\S.*",
"title": "Dialog name",
"description": "Name of the dialog to call.",
"examples": [
"AddToDoDialog"
"oneOf": [
{
"$kind": "Microsoft.IDialog",
"pattern": "^(?!(=)).*",
"title": "Dialog",
"$ref": "#/definitions/Microsoft.IDialog"
},
{
"examples": [
"=settings.dialogId"
],
"type": "string",
"title": "Expression",
"pattern": "^=.*\\S.*"
}
],
"$ref": "#/definitions/Microsoft.IDialog"
"title": "Dialog name",
"description": "Name of the dialog to call."
},
"options": {
"title": "Options",
Expand Down Expand Up @@ -1644,6 +1658,206 @@
}
]
},
"activityProcessed": {
"title": "Activity Processed",
"description": "When set to false, the caller dialog is told it should process the current activity.",
"default": true,
"$role": "expression",
"oneOf": [
{
"type": "boolean",
"title": "Boolean",
"default": false,
"examples": [
false
]
},
{
"examples": [
"=user.isVip"
],
"type": "string",
"title": "Expression",
"pattern": "^=.*\\S.*"
}
]
},
"eventName": {
"title": "Event name",
"description": "Name of the event to emit.",
"$role": "expression",
"oneOf": [
{
"type": "string",
"title": "String",
"pattern": "^(?!(=)).*",
"examples": [
"Hello ${user.name}"
]
},
{
"examples": [
"=concat('x','y','z')"
],
"type": "string",
"title": "Expression",
"pattern": "^=.*\\S.*"
}
]
},
"eventValue": {
"title": "Event value",
"description": "Value to emit with the event (optional).",
"$role": "expression",
"oneOf": [
{
"type": "object",
"title": "Object"
},
{
"type": "array",
"title": "Array"
},
{
"type": "string",
"title": "String",
"pattern": "^(?!(=)).*",
"examples": [
"Hello ${user.name}"
]
},
{
"type": "boolean",
"title": "Boolean",
"examples": [
false
]
},
{
"type": "number",
"title": "Number",
"examples": [
15.5
]
},
{
"examples": [
"=..."
],
"type": "string",
"title": "Expression",
"pattern": "^=.*\\S.*"
}
],
"additionalProperties": true
}
},
"additionalProperties": false,
"patternProperties": {
"^\\$": {
"type": "string"
}
},
"anyOf": [
{
"title": "Reference",
"required": [
"$copy"
]
},
{
"title": "Type",
"required": [
"$kind"
]
}
]
},
"Microsoft.CancelDialog": {
"$role": "implements(Microsoft.IDialog)",
"title": "Cancel all dialogs",
"description": "Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.",
"type": "object",
"properties": {
"$kind": {
"title": "$kind",
"description": "Defines the valid properties for the component you are configuring (from a dialog .schema file)",
"type": "string",
"pattern": "^[a-zA-Z][a-zA-Z0-9.]*$",
"const": "Microsoft.CancelDialog"
},
"$copy": {
"title": "$copy",
"description": "Copy the definition by id from a .dialog file.",
"type": "string",
"pattern": "^(([a-zA-Z][a-zA-Z0-9.]*)?(#[a-zA-Z][a-zA-Z0-9.]*)?)$"
},
"$id": {
"title": "$id",
"description": "Inline id for reuse of an inline definition",
"type": "string",
"pattern": "^([a-zA-Z][a-zA-Z0-9.]*)$"
},
"$designer": {
"title": "$designer",
"type": "object",
"description": "Extra information for the Bot Framework Designer."
},
"id": {
"type": "string",
"title": "Id",
"description": "Optional id for the dialog"
},
"disabled": {
"title": "Disabled",
"description": "Optional condition which if true will disable this action.",
"examples": [
"user.age > 3"
],
"$role": "expression",
"oneOf": [
{
"type": "boolean",
"title": "Boolean",
"default": false,
"examples": [
false
]
},
{
"examples": [
"=user.isVip"
],
"type": "string",
"title": "Expression",
"pattern": "^=.*\\S.*"
}
]
},
"activityProcessed": {
"title": "Activity Processed",
"description": "When set to false, the caller dialog is told it should process the current activity.",
"default": true,
"$role": "expression",
"oneOf": [
{
"type": "boolean",
"title": "Boolean",
"default": false,
"examples": [
false
]
},
{
"examples": [
"=user.isVip"
],
"type": "string",
"title": "Expression",
"pattern": "^=.*\\S.*"
}
]
},
"eventName": {
"title": "Event name",
"description": "Name of the event to emit.",
Expand Down Expand Up @@ -6758,6 +6972,11 @@
"description": "Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.",
"$ref": "#/definitions/Microsoft.CancelAllDialogs"
},
{
"title": "Microsoft.CancelDialog",
"description": "Cancel all active dialogs. All dialogs in the dialog chain will need a trigger to capture the event configured in this action.",
"$ref": "#/definitions/Microsoft.CancelDialog"
},
{
"title": "Microsoft.ChoiceInput",
"description": "Collect information - Pick from a list of choices",
Expand Down Expand Up @@ -13799,15 +14018,24 @@
]
},
"dialog": {
"$kind": "Microsoft.IDialog",
"$role": "expression",
"type": "string",
"title": "Dialog name",
"description": "Name of the dialog to call.",
"examples": [
"AddToDoDialog"
"oneOf": [
{
"$kind": "Microsoft.IDialog",
"pattern": "^(?!(=)).*",
"title": "Dialog",
"$ref": "#/definitions/Microsoft.IDialog"
},
{
"examples": [
"=settings.dialogId"
],
"type": "string",
"title": "Expression",
"pattern": "^=.*\\S.*"
}
],
"$ref": "#/definitions/Microsoft.IDialog"
"title": "Dialog name",
"description": "Name of the dialog to call."
},
"options": {
"title": "Options",
Expand Down
Loading