Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit 6665b4a

Browse files
authored
Nigao/moneyschema (#435)
* age schema * dimension schema * geography schema * geography schema * fix bug, temperature schema * change schema name * rename several properties * delete test2.schema
1 parent 24f8123 commit 6665b4a

27 files changed

+198
-95
lines changed

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@
110110
],
111111
"args": [
112112
"dialog:generate",
113-
"${workspaceFolder}/packages/dialog/test/commands/dialog/forms/test2.schema",
113+
"${workspaceFolder}/packages/dialog/test/commands/dialog/forms/unittests.schema",
114114
"-o",
115-
"${env:TEMP}/test.out",
115+
"${env:TEMP}/unittests.out",
116116
"--force",
117117
"--verbose"
118118
],
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema",
3+
"age": {
4+
"type": "object",
5+
"$mappings": ["@{concat('age:', property)}", "age"],
6+
"properties": {
7+
"number": {
8+
"type": "number"
9+
},
10+
"units": {
11+
"type": "string"
12+
}
13+
},
14+
"required": ["number", "units"],
15+
"$templates": ["age.lu","objectProperty.lg", "stringAsk.dialog","ageSet.dialog"]
16+
}
17+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# filename
3+
- @{schemaName}-@{property}Setage.dialog
4+
5+
# template
6+
- ```
7+
{
8+
"$schema": "@{appSchema}",
9+
"$kind": "Microsoft.OnSetProperty",
10+
"property": "@{property}",
11+
"entity": "age",
12+
"actions": [
13+
{
14+
"$kind": "Microsoft.SetProperty",
15+
"property": "$@{property}.number",
16+
"value": "@age['number']"
17+
},
18+
{
19+
"$kind": "Microsoft.SetProperty",
20+
"property": "$@{property}.units",
21+
"value": "@age['units']"
22+
}
23+
]
24+
}
25+
```

packages/dialog/templates/currency.schema

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema",
3+
"dimension": {
4+
"type": "object",
5+
"$mappings": ["@{concat('dimension:', property)}", "dimension"],
6+
"properties": {
7+
"number": {
8+
"type": "number"
9+
},
10+
"units": {
11+
"type": "string"
12+
}
13+
},
14+
"required": ["number", "units"],
15+
"$templates": ["dimension.lu","objectProperty.lg", "stringAsk.dialog","dimensionSet.dialog"]
16+
}
17+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
# filename
3+
- @{schemaName}-@{property}Setdimension.dialog
4+
5+
# template
6+
- ```
7+
{
8+
"$schema": "@{appSchema}",
9+
"$kind": "Microsoft.OnSetProperty",
10+
"property": "@{property}",
11+
"entity": "dimension",
12+
"actions": [
13+
{
14+
"$kind": "Microsoft.SetProperty",
15+
"property": "$@{property}.number",
16+
"value": "@dimension['number']"
17+
},
18+
{
19+
"$kind": "Microsoft.SetProperty",
20+
"property": "$@{property}.units",
21+
"value": "@dimension['units']"
22+
}
23+
]
24+
}
25+
```

packages/dialog/templates/en-us/age.lu.lg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# filename
2-
- @{entityFilename()}
2+
- @{schemaName}-age.@{locale}.lu
33

44
# template
55
- $PREBUILT:age @{roles()}

packages/dialog/templates/en-us/currency.lu.lg

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/dialog/templates/en-us/dimension.lu.lg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# filename
2-
- @{entityFilename()}
2+
- @{schemaName}-dimension.@{locale}.lu
33

44
# template
55
- $PREBUILT:dimension @{roles()}

packages/dialog/templates/en-us/email.lu.lg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# filename
2-
- @{entityFilename()}
2+
- @{schemaName}-email.@{locale}.lu
33

44
# template
55
- $PREBUILT:email @{roles()}

0 commit comments

Comments
 (0)