Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation fails on valid Choice comparison operators (IsNull, IsPresent, ...) #363

Closed
asgoth opened this issue Aug 18, 2020 · 3 comments
Closed

Comments

@asgoth
Copy link

asgoth commented Aug 18, 2020

This is a Bug

Description

The validation (via stepFunctions.validate: true) fails, when using Choice comparison operators IsNull, IsPresent, ...

See https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-choice-state.html.

Error:

  ✕ State machine "MyStateMachine" definition is invalid:
  
  data.States['MyChoiceState'].Choices[0] should have required property '.And'
  data.States['MyChoiceState'].Choices[0] should have required property '.BooleanEquals'
  data.States['MyChoiceState'].Choices[0] should have required property '.Not'
  data.States['MyChoiceState'].Choices[0] should have required property '.NumericEquals'
  data.States['MyChoiceState'].Choices[0] should have required property '.NumericGreaterThan'
  data.States['MyChoiceState'].Choices[0] should have required property '.NumericGreaterThanEquals'
  data.States['MyChoiceState'].Choices[0] should have required property '.NumericLessThan'
  data.States['MyChoiceState'].Choices[0] should have required property '.NumericLessThanEquals'
  data.States['MyChoiceState'].Choices[0] should have required property '.Or'
  data.States['MyChoiceState'].Choices[0] should have required property '.StringEquals'
  data.States['MyChoiceState'].Choices[0] should have required property '.StringGreaterThan'
  data.States['MyChoiceState'].Choices[0] should have required property '.StringGreaterThanEquals'
  data.States['MyChoiceState'].Choices[0] should have required property '.StringLessThan'
  data.States['MyChoiceState'].Choices[0] should have required property '.StringLessThanEquals'
  data.States['MyChoiceState'].Choices[0] should have required property '.TimestampEquals'
  data.States['MyChoiceState'].Choices[0] should have required property '.TimestampGreaterThan'
  data.States['MyChoiceState'].Choices[0] should have required property '.TimestampGreaterThanEquals'
  data.States['MyChoiceState'].Choices[0] should have required property '.TimestampLessThan'
  data.States['MyChoiceState'].Choices[0] should have required property '.TimestampLessThanEquals'
  data.States['MyChoiceState'].Choices[0] should match exactly one schema in oneOf
  data.States['MyChoiceState'] should NOT have additional properties
  data.States['MyChoiceState'] should NOT have additional properties
  data.States['MyChoiceState'] should NOT have additional properties
  data.States['MyChoiceState'] should NOT have additional properties
  data.States['MyChoiceState'] should NOT have additional properties
  data.States['MyChoiceState'] should NOT have additional properties
  data.States['MyChoiceState'] should NOT have additional properties
  data.States['MyChoiceState'] should match exactly one schema in oneOf

Additional Data

  Your Environment Information ---------------------------
     Operating System:          darwin
     Node Version:              13.6.0
     Framework Version:         1.78.1
     Plugin Version:            3.7.0
     SDK Version:               2.3.1
     Components Version:        2.34.3
@theburningmonk
Copy link
Collaborator

this should be fixed in v2.26.0

@theburningmonk
Copy link
Collaborator

@asgoth can you double-check and reopen this ticket if it's still a problem.

@saulomano
Copy link

I have the same issue with enabled validate: true. The version is "serverless-step-functions": "^2.29.0"

ss-betseqnzr pushed a commit to BetSEQNZR/serverless-step-functions that referenced this issue Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants