Created
February 24, 2025 14:03
-
-
Save hsusanoo/cb80aa70c842518aff5c409b99f4c144 to your computer and use it in GitHub Desktop.
ASL JSON schema for Step Functions definition (bundled from https://github.com/ChristopheBougere/asl-validator v3.13.0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"definitions": { | |
"baseStateMachine": { | |
"$id": "http://asl-validator.cloud/base-state-machine.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"Comment": { | |
"type": "string" | |
}, | |
"StartAt": { | |
"type": "string" | |
}, | |
"States": { | |
"type": "object", | |
"patternProperties": { | |
"^.{1,80}$": { | |
"$ref": "#/definitions/state" | |
} | |
}, | |
"additionalProperties": false | |
} | |
}, | |
"required": [ | |
"StartAt", | |
"States" | |
] | |
}, | |
"choice": { | |
"$id": "http://asl-validator.cloud/choice.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"definitions": { | |
"Operator": { | |
"type": "object", | |
"properties": { | |
"Variable": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"And": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/choice/definitions/Operator" | |
} | |
}, | |
"Or": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/choice/definitions/Operator" | |
} | |
}, | |
"Not": { | |
"$ref": "#/definitions/choice/definitions/Operator" | |
}, | |
"IsNull": { | |
"type": "boolean" | |
}, | |
"IsPresent": { | |
"type": "boolean" | |
}, | |
"BooleanEquals": { | |
"type": "boolean" | |
}, | |
"BooleanEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"IsBoolean": { | |
"type": "boolean" | |
}, | |
"NumericEquals": { | |
"type": "number" | |
}, | |
"NumericEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"NumericGreaterThan": { | |
"type": "number" | |
}, | |
"NumericGreaterThanPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"NumericGreaterThanEquals": { | |
"type": "number" | |
}, | |
"NumericGreaterThanEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"NumericLessThan": { | |
"type": "number" | |
}, | |
"NumericLessThanPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"NumericLessThanEquals": { | |
"type": "number" | |
}, | |
"NumericLessThanEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"IsNumeric": { | |
"type": "boolean" | |
}, | |
"StringEquals": { | |
"type": "string" | |
}, | |
"StringEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"StringGreaterThan": { | |
"type": "string" | |
}, | |
"StringGreaterThanPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"StringGreaterThanEquals": { | |
"type": "string" | |
}, | |
"StringGreaterThanEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"StringLessThan": { | |
"type": "string" | |
}, | |
"StringLessThanPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"StringLessThanEquals": { | |
"type": "string" | |
}, | |
"StringLessThanEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"StringMatches": { | |
"type": "string" | |
}, | |
"IsString": { | |
"type": "boolean" | |
}, | |
"TimestampEquals": { | |
"type": "string" | |
}, | |
"TimestampEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"TimestampGreaterThan": { | |
"type": "string" | |
}, | |
"TimestampGreaterThanPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"TimestampGreaterThanEquals": { | |
"type": "string" | |
}, | |
"TimestampGreaterThanEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"TimestampLessThan": { | |
"type": "string" | |
}, | |
"TimestampLessThanPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"TimestampLessThanEquals": { | |
"type": "string" | |
}, | |
"TimestampLessThanEqualsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"IsTimestamp": { | |
"type": "boolean" | |
}, | |
"Condition": { | |
"$ref": "#/definitions/jsonata/definitions/condition" | |
} | |
}, | |
"oneOf": [ | |
{ | |
"required": [ | |
"And" | |
] | |
}, | |
{ | |
"required": [ | |
"BooleanEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"BooleanEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"IsBoolean" | |
] | |
}, | |
{ | |
"required": [ | |
"Not" | |
] | |
}, | |
{ | |
"required": [ | |
"IsNull" | |
] | |
}, | |
{ | |
"required": [ | |
"IsPresent" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericGreaterThan" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericGreaterThanPath" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericGreaterThanEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericGreaterThanEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericLessThan" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericLessThanPath" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericLessThanEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"NumericLessThanEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"IsNumeric" | |
] | |
}, | |
{ | |
"required": [ | |
"Or" | |
] | |
}, | |
{ | |
"required": [ | |
"StringEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"StringEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"StringGreaterThan" | |
] | |
}, | |
{ | |
"required": [ | |
"StringGreaterThanPath" | |
] | |
}, | |
{ | |
"required": [ | |
"StringGreaterThanEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"StringGreaterThanEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"StringLessThan" | |
] | |
}, | |
{ | |
"required": [ | |
"StringLessThanPath" | |
] | |
}, | |
{ | |
"required": [ | |
"StringLessThanEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"StringLessThanEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"StringMatches" | |
] | |
}, | |
{ | |
"required": [ | |
"IsString" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampGreaterThan" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampGreaterThanPath" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampGreaterThanEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampGreaterThanEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampLessThan" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampLessThanPath" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampLessThanEquals" | |
] | |
}, | |
{ | |
"required": [ | |
"TimestampLessThanEqualsPath" | |
] | |
}, | |
{ | |
"required": [ | |
"IsTimestamp" | |
] | |
}, | |
{ | |
"required": [ | |
"Condition" | |
] | |
} | |
] | |
} | |
}, | |
"type": "object", | |
"properties": { | |
"Type": { | |
"type": "string", | |
"enum": [ | |
"Choice" | |
] | |
}, | |
"Next": { | |
"type": "string" | |
}, | |
"End": { | |
"enum": [ | |
true | |
] | |
}, | |
"Comment": { | |
"type": "string" | |
}, | |
"OutputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"InputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"Choices": { | |
"type": "array", | |
"items": { | |
"allOf": [ | |
{ | |
"type": "object", | |
"properties": { | |
"Next": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"Next" | |
] | |
}, | |
{ | |
"$ref": "#/definitions/choice/definitions/Operator" | |
} | |
] | |
} | |
}, | |
"Default": { | |
"type": "string" | |
}, | |
"QueryLanguage": { | |
"$ref": "#/definitions/jsonata/definitions/queryLanguage" | |
}, | |
"Output": { | |
"$ref": "#/definitions/jsonata/definitions/output" | |
} | |
}, | |
"required": [ | |
"Type", | |
"Choices" | |
], | |
"additionalProperties": false | |
}, | |
"errors": { | |
"$id": "http://asl-validator.cloud/errors.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"description": "https://states-language.net/#appendix-a", | |
"anyOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.ALL" | |
], | |
"description": "A wildcard which matches any Error Name." | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.HeartbeatTimeout" | |
], | |
"description": "A Task State failed to heartbeat for a time longer than the \"HeartbeatSeconds\" value." | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.Timeout" | |
], | |
"description": "A Task State either ran longer than the \"TimeoutSeconds\" value, or failed to heartbeat for a time longer than the \"HeartbeatSeconds\" value." | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.TaskFailed" | |
], | |
"description": "A Task State failed during the execution." | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.Permissions" | |
], | |
"description": "A Task State failed because it had insufficient privileges to execute the specified code." | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.ResultPathMatchFailure" | |
], | |
"description": "A state's \"ResultPath\" field cannot be applied to the input the state received." | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.ParameterPathFailure" | |
], | |
"description": "Within a state's \"Parameters\" field, the attempt to replace a field whose name ends in \".$\" using a Path failed." | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.BranchFailed" | |
], | |
"description": "A branch of a Parallel State failed." | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.NoChoiceMatched" | |
], | |
"description": "A Choice State failed to find a match for the condition field extracted from its input." | |
}, | |
{ | |
"type": "string", | |
"enum": [ | |
"States.IntrinsicFailure" | |
], | |
"description": "Within a Payload Template, the attempt to invoke an Intrinsic Function failed." | |
} | |
] | |
}, | |
"fail": { | |
"$id": "http://asl-validator.cloud/fail.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"Type": { | |
"type": "string", | |
"enum": [ | |
"Fail" | |
] | |
}, | |
"Comment": { | |
"type": "string" | |
}, | |
"Cause": { | |
"type": "string" | |
}, | |
"CausePath": { | |
"$comment": "This field is a ReferencePath with limited Intrinsic Function support. Using string until custom validation is available.", | |
"type": "string" | |
}, | |
"Error": { | |
"type": "string" | |
}, | |
"ErrorPath": { | |
"$comment": "This field is a ReferencePath with limited Intrinsic Function support. Using string until custom validation is available.", | |
"type": "string" | |
}, | |
"QueryLanguage": { | |
"$ref": "#/definitions/jsonata/definitions/queryLanguage" | |
} | |
}, | |
"required": [ | |
"Type" | |
], | |
"additionalProperties": false | |
}, | |
"jsonata": { | |
"$id": "http://asl-validator.cloud/jsonata.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"definitions": { | |
"output": { | |
"oneOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "object" | |
} | |
] | |
}, | |
"assign": { | |
"type": "object" | |
}, | |
"arguments": { | |
"oneOf": [ | |
{ | |
"type": "string" | |
}, | |
{ | |
"type": "object" | |
} | |
] | |
}, | |
"queryLanguage": { | |
"type": "string", | |
"enum": [ | |
"JSONata", | |
"JSONPath" | |
] | |
}, | |
"condition": { | |
"type": "string" | |
} | |
} | |
}, | |
"map": { | |
"$id": "http://asl-validator.cloud/map.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"Type": { | |
"type": "string", | |
"enum": [ | |
"Map" | |
] | |
}, | |
"Next": { | |
"type": "string" | |
}, | |
"End": { | |
"enum": [ | |
true | |
] | |
}, | |
"Comment": { | |
"type": "string" | |
}, | |
"OutputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"InputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"ResultPath": { | |
"$ref": "#/definitions/paths/definitions/asl_result_path" | |
}, | |
"ItemsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"Label": { | |
"type": "string" | |
}, | |
"MaxConcurrency": { | |
"type": "number", | |
"minimum": 0 | |
}, | |
"MaxConcurrencyPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"ItemReader": { | |
"$comment": "A Map State MAY have an \"ItemReader\" field, whose value MUST be a JSON object and is called the ItemReader Configuration", | |
"type": "object", | |
"properties": { | |
"Resource": { | |
"$comment": "The ItemReader Configuration MUST have a \"Resource\" field, whose value MUST be a URI that uniquely identifies the specific task to execute. The States language does not constrain the URI scheme nor any other part of the URI.", | |
"type": "string" | |
}, | |
"Parameters": { | |
"$comment": "The ItemReader Configuration MAY have a \"Parameters\" field, whose value MUST be a Payload Template.", | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"ReaderConfig": { | |
"$comment": "The ItemReader Configuration MAY have a \"ReaderConfig\" field whose value is a JSON object which MAY have a \"MaxItems\" field which MUST be a positive integer.", | |
"type": "object", | |
"properties": { | |
"MaxItems": { | |
"$comment": "MAY have a \"MaxItems\" field which MUST be a positive integer", | |
"type": "integer", | |
"minimum": 1 | |
}, | |
"MaxItemsPath": { | |
"$comment": "A \"ReaderConfig\" field MAY have \"MaxItemsPath\" field which MUST be a Reference Path which, when resolved, MUST select a field whose value is a positive integer.", | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"Arguments": { | |
"$ref": "#/definitions/jsonata/definitions/arguments" | |
} | |
}, | |
"additionalProperties": true | |
} | |
}, | |
"required": [ | |
"Resource" | |
] | |
}, | |
"ItemProcessor": { | |
"type": "object", | |
"allOf": [ | |
{ | |
"$ref": "#/definitions/baseStateMachine" | |
} | |
], | |
"$comment": "The \"ItemProcessor\" field MAY contain a field named \"ProcessorConfig\", whose value MUST be a JSON object whose value is defined by the interpreter.", | |
"properties": { | |
"ProcessorConfig": { | |
"type": "object", | |
"oneOf": [ | |
{ | |
"properties": { | |
"Mode": { | |
"type": "string", | |
"enum": [ | |
"INLINE" | |
] | |
} | |
}, | |
"required": [ | |
"Mode" | |
] | |
}, | |
{ | |
"properties": { | |
"Mode": { | |
"type": "string", | |
"enum": [ | |
"DISTRIBUTED" | |
] | |
}, | |
"ExecutionType": { | |
"type": "string", | |
"enum": [ | |
"EXPRESS", | |
"STANDARD" | |
] | |
} | |
}, | |
"required": [ | |
"Mode", | |
"ExecutionType" | |
] | |
} | |
] | |
} | |
} | |
}, | |
"Iterator": { | |
"$ref": "#/definitions/baseStateMachine" | |
}, | |
"Parameters": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"ItemSelector": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"ItemBatcher": { | |
"type": "object", | |
"properties": { | |
"MaxItemsPerBatch": { | |
"type": "number", | |
"minimum": 0 | |
}, | |
"MaxItemsPerBatchPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"MaxInputBytesPerBatch": { | |
"type": "number", | |
"minimum": 0, | |
"maximum": 262144 | |
}, | |
"MaxInputBytesPerBatchPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"BatchInput": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
} | |
} | |
}, | |
"ResultSelector": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"ResultWriter": { | |
"$comment": "Allow any object for now and update in a subsequent PR to support S3 buckets and other outputs", | |
"type": "object" | |
}, | |
"Retry": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"ErrorEquals": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/errors" | |
} | |
}, | |
"IntervalSeconds": { | |
"type": "number", | |
"minimum": 0 | |
}, | |
"MaxAttempts": { | |
"type": "number", | |
"minimum": 0 | |
}, | |
"BackoffRate": { | |
"type": "number", | |
"minimum": 0 | |
} | |
}, | |
"required": [ | |
"ErrorEquals" | |
] | |
} | |
}, | |
"Catch": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"ErrorEquals": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/errors" | |
} | |
}, | |
"Next": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"ErrorEquals", | |
"Next" | |
] | |
} | |
}, | |
"ToleratedFailureCount": { | |
"type": "integer", | |
"minimum": 0 | |
}, | |
"ToleratedFailureCountPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"ToleratedFailurePercentage": { | |
"type": "integer", | |
"minimum": 0, | |
"maximum": 100 | |
}, | |
"ToleratedFailurePercentagePath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"Output": { | |
"$ref": "#/definitions/jsonata/definitions/output" | |
}, | |
"Assign": { | |
"$ref": "#/definitions/jsonata/definitions/assign" | |
}, | |
"QueryLanguage": { | |
"$ref": "#/definitions/jsonata/definitions/queryLanguage" | |
} | |
}, | |
"required": [ | |
"Type" | |
], | |
"additionalProperties": false | |
}, | |
"parallel": { | |
"$id": "http://asl-validator.cloud/parallel.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"Type": { | |
"type": "string", | |
"enum": [ | |
"Parallel" | |
] | |
}, | |
"Parameters": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"ResultSelector": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"Next": { | |
"type": "string" | |
}, | |
"End": { | |
"enum": [ | |
true | |
] | |
}, | |
"Comment": { | |
"type": "string" | |
}, | |
"OutputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"InputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"ResultPath": { | |
"$ref": "#/definitions/paths/definitions/asl_result_path" | |
}, | |
"Branches": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/state-machine" | |
} | |
}, | |
"Retry": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"ErrorEquals": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/errors" | |
} | |
}, | |
"IntervalSeconds": { | |
"type": "number", | |
"minimum": 0 | |
}, | |
"MaxAttempts": { | |
"type": "number", | |
"minimum": 0 | |
}, | |
"BackoffRate": { | |
"type": "number", | |
"minimum": 0 | |
} | |
}, | |
"required": [ | |
"ErrorEquals" | |
] | |
} | |
}, | |
"Catch": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"ErrorEquals": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/errors" | |
} | |
}, | |
"Next": { | |
"type": "string" | |
}, | |
"ResultPath": { | |
"$ref": "#/definitions/paths/definitions/asl_result_path" | |
} | |
}, | |
"required": [ | |
"ErrorEquals", | |
"Next" | |
] | |
} | |
}, | |
"Output": { | |
"$ref": "#/definitions/jsonata/definitions/output" | |
}, | |
"Assign": { | |
"$ref": "#/definitions/jsonata/definitions/assign" | |
}, | |
"Arguments": { | |
"$ref": "#/definitions/jsonata/definitions/arguments" | |
}, | |
"QueryLanguage": { | |
"$ref": "#/definitions/jsonata/definitions/queryLanguage" | |
} | |
}, | |
"required": [ | |
"Type", | |
"Branches" | |
], | |
"additionalProperties": false | |
}, | |
"pass": { | |
"$id": "http://asl-validator.cloud/pass.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"Type": { | |
"type": "string", | |
"enum": [ | |
"Pass" | |
] | |
}, | |
"Next": { | |
"type": "string" | |
}, | |
"End": { | |
"enum": [ | |
true | |
] | |
}, | |
"Comment": { | |
"type": "string" | |
}, | |
"OutputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"InputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"ResultPath": { | |
"$ref": "#/definitions/paths/definitions/asl_result_path" | |
}, | |
"Parameters": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"Result": {}, | |
"Output": { | |
"$ref": "#/definitions/jsonata/definitions/output" | |
}, | |
"Assign": { | |
"$ref": "#/definitions/jsonata/definitions/assign" | |
}, | |
"QueryLanguage": { | |
"$ref": "#/definitions/jsonata/definitions/queryLanguage" | |
} | |
}, | |
"required": [ | |
"Type" | |
], | |
"additionalProperties": false | |
}, | |
"paths": { | |
"$id": "http://asl-validator.cloud/paths.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"definitions": { | |
"asl_path": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"format": "asl_path" | |
}, | |
"asl_ref_path": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"format": "asl_ref_path" | |
}, | |
"asl_result_path": { | |
"type": [ | |
"string", | |
"null" | |
], | |
"format": "asl_result_path" | |
}, | |
"_payload_template_object": { | |
"type": "object", | |
"patternProperties": { | |
"^.+\\.\\$$": { | |
"$comment": "matches fields ending in .$", | |
"type": "string", | |
"nullable": true, | |
"format": "asl_payload_template" | |
}, | |
"^.+(([^.][^$])|([^.][$]))$": { | |
"$comment": "matches fields NOT ending in .$", | |
"oneOf": [ | |
{ | |
"type": [ | |
"number", | |
"boolean", | |
"string", | |
"null" | |
] | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/asl_payload_template" | |
} | |
}, | |
{ | |
"$ref": "#/definitions/_payload_template_object" | |
} | |
] | |
} | |
} | |
}, | |
"asl_payload_template": { | |
"oneOf": [ | |
{ | |
"$ref": "#/definitions/_payload_template_object" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/asl_payload_template" | |
} | |
}, | |
{ | |
"type": [ | |
"string", | |
"boolean", | |
"number" | |
] | |
} | |
] | |
} | |
} | |
}, | |
"state-machine": { | |
"$id": "http://asl-validator.cloud/state-machine.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"Comment": { | |
"type": "string" | |
}, | |
"StartAt": { | |
"type": "string" | |
}, | |
"States": { | |
"type": "object", | |
"patternProperties": { | |
"^.{1,80}$": { | |
"$ref": "#/definitions/state" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"Version": { | |
"type": "string" | |
}, | |
"TimeoutSeconds": { | |
"type": "integer", | |
"minimum": 0 | |
}, | |
"QueryLanguage": { | |
"$ref": "#/definitions/jsonata/definitions/queryLanguage" | |
} | |
}, | |
"additionalProperties": false, | |
"required": [ | |
"StartAt", | |
"States" | |
] | |
}, | |
"state": { | |
"$id": "http://asl-validator.cloud/state.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"oneOf": [ | |
{ | |
"$ref": "#/definitions/choice" | |
}, | |
{ | |
"$ref": "#/definitions/fail" | |
}, | |
{ | |
"$ref": "#/definitions/parallel" | |
}, | |
{ | |
"$ref": "#/definitions/pass" | |
}, | |
{ | |
"$ref": "#/definitions/succeed" | |
}, | |
{ | |
"$ref": "#/definitions/task" | |
}, | |
{ | |
"$ref": "#/definitions/wait" | |
}, | |
{ | |
"$ref": "#/definitions/map" | |
} | |
] | |
}, | |
"succeed": { | |
"$id": "http://asl-validator.cloud/succeed.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"Type": { | |
"type": "string", | |
"enum": [ | |
"Succeed" | |
] | |
}, | |
"Comment": { | |
"type": "string" | |
}, | |
"OutputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"InputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"Output": { | |
"$ref": "#/definitions/jsonata/definitions/output" | |
}, | |
"QueryLanguage": { | |
"$ref": "#/definitions/jsonata/definitions/queryLanguage" | |
} | |
}, | |
"required": [ | |
"Type" | |
], | |
"additionalProperties": false | |
}, | |
"task": { | |
"$id": "http://asl-validator.cloud/task.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"Type": { | |
"type": "string", | |
"enum": [ | |
"Task" | |
] | |
}, | |
"Next": { | |
"type": "string" | |
}, | |
"End": { | |
"enum": [ | |
true | |
] | |
}, | |
"Comment": { | |
"type": "string" | |
}, | |
"OutputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"InputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"Resource": { | |
"oneOf": [ | |
{ | |
"type": "string", | |
"$comment": "defers validation to the registered formatter", | |
"format": "asl_arn" | |
}, | |
{ | |
"type": "string", | |
"$comment": "extension that allows for variable substitution before deployment", | |
"pattern": "^\\$\\{[^\\}]+\\}$" | |
}, | |
{ | |
"type": "object", | |
"$comment": "extensions that allows for variable substitution via cloud function", | |
"properties": { | |
"Ref": { | |
"type": "string" | |
} | |
}, | |
"patternProperties": { | |
"^Fn::[A-Za-z\\d]+$": { | |
"type": [ | |
"object", | |
"string", | |
"array" | |
] | |
} | |
} | |
} | |
] | |
}, | |
"ResultPath": { | |
"$ref": "#/definitions/paths/definitions/asl_result_path" | |
}, | |
"Retry": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"ErrorEquals": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/errors" | |
} | |
}, | |
"IntervalSeconds": { | |
"type": "number", | |
"minimum": 0 | |
}, | |
"MaxAttempts": { | |
"type": "number", | |
"minimum": 0 | |
}, | |
"BackoffRate": { | |
"type": "number", | |
"minimum": 0 | |
} | |
}, | |
"required": [ | |
"ErrorEquals" | |
] | |
} | |
}, | |
"Catch": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"ErrorEquals": { | |
"type": "array", | |
"items": { | |
"$ref": "#/definitions/errors" | |
} | |
}, | |
"Next": { | |
"type": "string" | |
}, | |
"ResultPath": { | |
"$ref": "#/definitions/paths/definitions/asl_result_path" | |
} | |
}, | |
"required": [ | |
"ErrorEquals", | |
"Next" | |
] | |
} | |
}, | |
"TimeoutSeconds": { | |
"type": "number", | |
"minimum": 1 | |
}, | |
"TimeoutSecondsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"HeartbeatSeconds": { | |
"type": "number", | |
"minimum": 1 | |
}, | |
"HeartbeatSecondsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"ResultSelector": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"Parameters": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"Credentials": { | |
"$ref": "#/definitions/paths/definitions/asl_payload_template" | |
}, | |
"Output": { | |
"$ref": "#/definitions/jsonata/definitions/output" | |
}, | |
"Assign": { | |
"$ref": "#/definitions/jsonata/definitions/assign" | |
}, | |
"Arguments": { | |
"$ref": "#/definitions/jsonata/definitions/arguments" | |
}, | |
"QueryLanguage": { | |
"$ref": "#/definitions/jsonata/definitions/queryLanguage" | |
} | |
}, | |
"required": [ | |
"Type", | |
"Resource" | |
], | |
"additionalProperties": false | |
}, | |
"wait": { | |
"$id": "http://asl-validator.cloud/wait.json#", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"Type": { | |
"type": "string", | |
"enum": [ | |
"Wait" | |
] | |
}, | |
"Next": { | |
"type": "string" | |
}, | |
"End": { | |
"enum": [ | |
true | |
] | |
}, | |
"Comment": { | |
"type": "string" | |
}, | |
"OutputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"InputPath": { | |
"$ref": "#/definitions/paths/definitions/asl_path" | |
}, | |
"Seconds": { | |
"type": "number", | |
"minimum": 0 | |
}, | |
"Timestamp": { | |
"type": "string" | |
}, | |
"SecondsPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"TimestampPath": { | |
"$ref": "#/definitions/paths/definitions/asl_ref_path" | |
}, | |
"Output": { | |
"$ref": "#/definitions/jsonata/definitions/output" | |
}, | |
"Assign": { | |
"$ref": "#/definitions/jsonata/definitions/assign" | |
}, | |
"QueryLanguage": { | |
"$ref": "#/definitions/jsonata/definitions/queryLanguage" | |
} | |
}, | |
"required": [ | |
"Type" | |
], | |
"additionalProperties": false | |
} | |
}, | |
"$ref": "#/definitions/state-machine" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment