Skip to content

statelint doesn't support all Map options #29

@xentek

Description

@xentek

For given input:

{
  "peas": ["a", "b", "c"],
  "queue": "example"
}

This state machine should be valid:

{
  "StartAt": "PeasAndQueues",
  "States": {
    "PeasAndQueues": {
      "Type": "Map",
      "End": true,
      "ItemsPath": "$.peas",
      "MaxConcurrency": 0,
      "Parameters": {
        "p.$": "$$.Map.Item.Value",
        "q.$": "$.queue"
      },
      "Iterator": {
        "StartAt": "DoWork",
        "States": {
          "DoWork": {
            "Type": "Task",
            "End": true,
            "Resource": "arn:aws:lambda:us-east-1:000000:function:do-work"
          }
        }
      }
    }
  }
}

Yet I get:

2 errors:
 Field "ItemsPath" not allowed in State Machine
 Field "MaxConcurrency" not allowed in State Machine

(error output shortened for clarity)

Happy to submit a patch, but wasn't sure if data/StateMachine.j2119 was generated or maintained by hand -- a cursory glance at the code seems to suggest this file is what needs to be changed to support ItemsPath and MaxConcurrency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions