From aaa0ffd47a1f5d7d3bf2df91f4b67b4d50330e6d Mon Sep 17 00:00:00 2001 From: Fernly Park Date: Wed, 9 Dec 2020 21:12:33 +0100 Subject: [PATCH 1/2] Add ResultSelector to the parallel state --- .../valid-parameters-resultSelector.json | 23 +++++++++++++++++++ src/schemas/parallel.json | 3 +++ 2 files changed, 26 insertions(+) create mode 100644 src/__tests__/definitions/valid-parameters-resultSelector.json diff --git a/src/__tests__/definitions/valid-parameters-resultSelector.json b/src/__tests__/definitions/valid-parameters-resultSelector.json new file mode 100644 index 0000000..2e1e95c --- /dev/null +++ b/src/__tests__/definitions/valid-parameters-resultSelector.json @@ -0,0 +1,23 @@ +{ + "StartAt": "Parallel State", + "States": { + "Parallel State": { + "Type": "Parallel", + "ResultSelector": { + "output.$": "$" + }, + "Branches": [ + { + "StartAt": "State", + "States": { + "State": { + "Type": "Pass", + "End": true + } + } + } + ], + "End": true + } + } +} \ No newline at end of file diff --git a/src/schemas/parallel.json b/src/schemas/parallel.json index b0bfcca..ed1c2b2 100644 --- a/src/schemas/parallel.json +++ b/src/schemas/parallel.json @@ -10,6 +10,9 @@ "Parameters": { "type": "object" }, + "ResultSelector": { + "type": "object" + }, "Next": { "type": "string" }, From 29f22780c63cfb33f145aaaf24b1c459adf3db20 Mon Sep 17 00:00:00 2001 From: Fernly Park Date: Wed, 9 Dec 2020 21:18:11 +0100 Subject: [PATCH 2/2] Add ResultSelector to the map state --- .../definitions/valid-map-resultSelector.json | 22 +++++++++++++++++++ src/schemas/map.json | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 src/__tests__/definitions/valid-map-resultSelector.json diff --git a/src/__tests__/definitions/valid-map-resultSelector.json b/src/__tests__/definitions/valid-map-resultSelector.json new file mode 100644 index 0000000..c297758 --- /dev/null +++ b/src/__tests__/definitions/valid-map-resultSelector.json @@ -0,0 +1,22 @@ +{ + "StartAt": "Map State", + "States": { + "Map State": { + "Type": "Map", + "MaxConcurrency": 0, + "ResultSelector": { + "output.$": "$" + }, + "Iterator": { + "StartAt": "Pass State", + "States": { + "Pass State": { + "Type": "Pass", + "End": true + } + } + }, + "End": true + } + } +} \ No newline at end of file diff --git a/src/schemas/map.json b/src/schemas/map.json index c13ee3b..31fdd72 100644 --- a/src/schemas/map.json +++ b/src/schemas/map.json @@ -38,6 +38,9 @@ "Parameters": { "type": "object" }, + "ResultSelector": { + "type": "object" + }, "Retry": { "type": "array", "items": {