Skip to content

Commit

Permalink
fix: bump version of path validator to support current value expr
Browse files Browse the repository at this point in the history
  • Loading branch information
markford authored and ChristopheBougere committed Aug 21, 2024
1 parent 7dc622e commit 6e91a84
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"homepage": "https://github.com/ChristopheBougere/asl-validator#readme",
"dependencies": {
"ajv": "^8.12.0",
"asl-path-validator": "^0.12.0",
"asl-path-validator": "^0.13.0",
"commander": "^10.0.1",
"jsonpath-plus": "^7.2.0",
"yaml": "^2.3.1"
Expand Down
40 changes: 40 additions & 0 deletions src/__tests__/definitions/valid-current-value-predicate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"StartAt": "Mock Service Catalog Describe Record",
"States": {
"Mock Service Catalog Describe Record": {
"Type": "Pass",
"Parameters": {
"DescribeRecord": {
"RecordDetail": {
"RecordId": "rec-abcdefghijklm",
"Status": "SUCCEEDED",
"COMMENT": "there are more properties, limited for brevity"
},
"RecordOutputs": [
{
"Description": "Foo Bar",
"OutputKey": "FooBar",
"OutputValue": "0123456789"
},
{
"Description": "Fizz Buzz",
"OutputKey": "FizzBuzz",
"OutputValue": "[email protected]"
}
]
}
},
"ResultPath": "$",
"Next": "Get Record Outputs"
},
"Get Record Outputs": {
"Type": "Pass",
"Parameters": {
"FooBar.$": "States.ArrayGetItem($.DescribeRecord.RecordOutputs[?(@.OutputKey == FooBar)].OutputValue, 0)",
"FizzBuzz.$": "States.ArrayGetItem($.DescribeRecord.RecordOutputs[?(@.OutputKey == FizzBuzz)].OutputValue, 0)"
},
"ResultPath": "$",
"End": true
}
}
}

0 comments on commit 6e91a84

Please sign in to comment.