Skip to content

Commit 899492d

Browse files
authored
feat: upgrade asl-path-validator to improve validation of MathAdd (#167)
1 parent fdb7149 commit 899492d

4 files changed

Lines changed: 36 additions & 8 deletions

File tree

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"homepage": "https://github.com/ChristopheBougere/asl-validator#readme",
3535
"dependencies": {
3636
"ajv": "^8.12.0",
37-
"asl-path-validator": "^0.15.0",
37+
"asl-path-validator": "^0.16.0",
3838
"commander": "^10.0.1",
3939
"jsonpath-plus": "^10.2.0",
4040
"yaml": "^2.3.1"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Comment": "MathAdd arguments must be paths or numbers",
3+
"StartAt": "validate input",
4+
"States": {
5+
"validate input": {
6+
"Type": "Pass",
7+
"Parameters": {
8+
"foo.$": "States.MathAdd(1,'-1')"
9+
},
10+
"ResultPath": "$.input",
11+
"End": true
12+
}
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"Comment": "MathAdd arguments must be paths or numbers",
3+
"StartAt": "validate input",
4+
"States": {
5+
"validate input": {
6+
"Type": "Pass",
7+
"Parameters": {
8+
"foo.$": "States.MathAdd(States.ArrayLength($$.Execution.Input.machines),-1)"
9+
},
10+
"ResultPath": "$.input",
11+
"End": true
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)