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
{{ message }}
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
* Initial check-in.
* Allof Working.
* Move definitions local.
* Launch to sdk.
* Everything working for new merge.
* schema: working
* Working except that allof expansion does not expand
local references.
* Simplification and some analysis working.
* Add extends.
* Everything working.
* Update help
* Fix typo
* Expand allOf and validate final schema.
* Missing as warning and validate schema.
* Update tests.
* Update test to pass on server.
* Normalize paths.
* Check normalize for mac
* Update for mac paths and lint.
* Address review comments.
* Update documentation and fix $id bugs.
* Address review commehts
* Fix bad merge.
Copy file name to clipboardExpand all lines: packages/dialog/src/commands/dialog/readme.md
+5-9Lines changed: 5 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,24 +2,20 @@
2
2
3
3
## Merge
4
4
5
-
Ths will merge together [Microsoft Bot Builder](https://github.com/Microsoft/BotBuilder) .schema JSON schema files into a single JSON schema file. You can point to the files either directly with a glob pattern or indirectly through a glob pattern that matches a package.json, packages.config or \*.csproj file. The .schema files should have a unique filename that is used to refer to that type using `$kind`. The .schema files can optionally include a `$schema: "https://raw.githubusercontent.com/Microsoft/botbuilder-tools/SchemaGen/packages/DialogSchema/src/dialogSchema.schema"` which defines the schema they are validated against. Within a schema definition you can use `$role:"implements(<kind>)` to project the type definition into interface types defined using `$role:"interface"` while merging. To refer to a type in a property, just use `"$kind":"<kind>"`. The merger combines all of the component .schema files into a single .schema file that has resolved all external `$ref`, merged `allOf` and connected together schemas through `$role` and `$kind`.
5
+
This will merge together [Microsoft Bot Builder](https://github.com/Microsoft/BotBuilder) .schema JSON schema files into a single JSON schema file. You can point to the files either directly with a glob pattern or indirectly through a glob pattern that matches a package.json, packages.config or \*.csproj file. The .schema files should have a unique filename that is used to refer to that type using `$kind`. The .schema files should include a `$schema: "https://raw.githubusercontent.com/microsoft/botframework-sdk/master/schemas/component/component.schema"` which defines the schema they are validated against. You can access common definitions by using `$ref: "schema:#/definitions/stringExpression"` in a property definition. At the top-level in a component schema you can use `$role:"implements(<kind>)` to project the type definition into interface types defined using `$role:"interface"` while merging. To extend an existing .schema file use `$role: "extends(<kind>)"`. To refer to a type in a property, use `"$kind":"<kind>"` and the corresponding kind will be wired into your schema. The merger combines all of the component .schema files into a single .schema file that has resolved all external `$ref`, merged `allOf` and connected together schemas through `$role` and `$kind`.
6
6
7
-
In addition to types you can also mark properties with a `$role` which will define the underlying type and restrictions. This is also useful information for UI tools to help you construct values. Roles include:
8
-
9
-
-`$role: "expression"` which marks a string property which is expected to contain an expression string.
10
-
-`$role: "lg"` which marks a string property which is used for language generation and can refer to LG templates.
11
-
-`$role: "memoryPath"` which marks a string property which is expected to contain a path in memory like `user.name`.
7
+
You can also mark properties with a `$role: "expression"` to indicate to tooling that an expression is allowed for that property.
12
8
13
9
For example look at these files:
14
10
15
11
-[IRecognizer.schema](test/schemas/IRecognizer.schema) defines the place holder for `IRecognizer` including a default option which is a bare string.
16
12
-[Recognizer.schema](test/schemas/Recognizer.schema) includes `$role:"implements(IRecognizer)"` which extends the `IRecognizer` definition when merged.
17
-
-[root.schema](test/schemas/root.schema) is a schema file that includes `$kind:"IRecognizer"` in order to make use of the `IRecognizer` place holder.
18
-
-[app.schema](test/examples/app.schema) was created by this tool shows how all of these definitions are merged together. In particular if you look at `IRecognizer` you will see the definition that includes a string, or the complete definition of `Recognizer`.
13
+
-[root.schema](test/schemas/root.schema) is a schema file that includes `$kind:"IRecognizer"` in order to make use of the `IRecognizer` place holder. The `$role: []` ensures that this is available as a top-level object.
14
+
-[app.schema](test/schemas/app.schema) was created by this tool shows how all of these definitions are merged together. In particular if you look at `IRecognizer` you will see the definition that includes a string, or the complete definition of `Recognizer`.
19
15
20
16
[root.dialog](test/examples/root.dialog) Shows how you could use the resulting schema to enter in JSON schema and get intellisense.
21
17
22
18
## Verify
23
19
24
-
The verify command will check .dialog files to ensure that they all meet the schema.
20
+
The verify command will check .dialog files to ensure that they all meet their $schema.
0 commit comments