{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aws-step-functions/json-schema/aws-step-functions-validate-state-machine-definition-output-schema.json",
  "title": "ValidateStateMachineDefinitionOutput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aws-step-functions-operations-api-openapi.yml#/components/schemas/ValidateStateMachineDefinitionOutput",
  "type": "object",
  "properties": {
    "result": {
      "type": "string",
      "enum": [
        "OK",
        "FAIL"
      ],
      "description": "The result value will be OK when no syntax errors are found, or FAIL if the workflow definition does not pass verification."
    },
    "diagnostics": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ValidateStateMachineDefinitionDiagnostic"
      },
      "description": "An array of diagnostic errors and warnings found during validation of the state machine definition. Since warnings do not prevent deploying your workflow definition, the result value could be OK even when warning diagnostics are present in the response."
    },
    "truncated": {
      "type": "boolean",
      "description": "The result value will be true if the number of diagnostics found in the workflow definition exceeds maxResults. When all diagnostics results are returned, the value will be false."
    }
  },
  "required": [
    "result",
    "diagnostics"
  ],
  "$defs": {
    "ValidateStateMachineDefinitionDiagnostic": {
      "type": "object",
      "properties": {
        "severity": {
          "type": "string",
          "enum": [
            "ERROR",
            "WARNING"
          ],
          "description": "A value of ERROR means that you cannot create or update a state machine with this definition. WARNING level diagnostics alert you to potential issues, but they will not prevent you from creating or updating your state machine."
        },
        "code": {
          "type": "string",
          "description": "Identifying code for the diagnostic."
        },
        "message": {
          "type": "string",
          "description": "Message describing the diagnostic condition."
        },
        "location": {
          "type": "string",
          "description": "Location of the issue in the state machine, if available. For errors specific to a field, the location could be in the format: /States//, for example: /States/FailState/ErrorPath."
        }
      },
      "required": [
        "severity",
        "code",
        "message"
      ]
    }
  }
}