{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/signicat/main/json-schema/signicat-update-workflow-request-schema.json",
  "title": "UpdateWorkflowRequest",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/signicat-mint-openapi.yml#/components/schemas/UpdateWorkflowRequest",
  "required": [
    "name",
    "steps"
  ],
  "type": "object",
  "properties": {
    "name": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string",
      "description": "The workflow name."
    },
    "description": {
      "maxLength": 5000,
      "minLength": 0,
      "type": [
        "null",
        "string"
      ],
      "description": "The workflow description."
    },
    "steps": {
      "maxItems": 250,
      "type": "array",
      "items": {
        "$ref": "#/$defs/WorkflowStep"
      },
      "description": "List of steps that define the workflow."
    },
    "connections": {
      "maxItems": 500,
      "type": [
        "null",
        "array"
      ],
      "items": {
        "$ref": "#/$defs/WorkflowStepConnection"
      },
      "description": "List of connections between workflow steps."
    },
    "variables": {
      "type": [
        "null",
        "object"
      ],
      "description": "Custom variables that can be used within a workflow."
    },
    "tags": {
      "maxItems": 20,
      "type": [
        "null",
        "array"
      ],
      "items": {
        "type": "string"
      },
      "description": "List of workflow tags."
    },
    "inputParameters": {
      "maxItems": 50,
      "type": [
        "null",
        "array"
      ],
      "items": {
        "$ref": "#/$defs/WorkflowInputParameter"
      },
      "description": "List of allowed input parameters for the workflow."
    },
    "domain": {
      "maxLength": 253,
      "minLength": 1,
      "type": [
        "null",
        "string"
      ],
      "description": "The domain the workflow runs under. Must be a domain configured on your account."
    }
  },
  "$defs": {
    "WorkflowInputParameter": {
      "required": [
        "name"
      ],
      "type": "object",
      "properties": {
        "name": {
          "maxLength": 100,
          "minLength": 1,
          "type": "string",
          "description": "The name of the input parameter."
        }
      }
    },
    "WorkflowStep": {
      "required": [
        "id",
        "type"
      ],
      "type": "object",
      "properties": {
        "id": {
          "maxLength": 50,
          "minLength": 0,
          "pattern": "^[0-9a-zA-Z-_]+$",
          "type": "string",
          "description": "Unique identifier for the step."
        },
        "type": {
          "maxLength": 100,
          "minLength": 1,
          "type": "string",
          "description": "The step type."
        },
        "name": {
          "maxLength": 100,
          "minLength": 0,
          "type": [
            "null",
            "string"
          ],
          "description": "The step name."
        },
        "displayName": {
          "maxLength": 100,
          "minLength": 0,
          "type": [
            "null",
            "string"
          ],
          "description": "The display name of the step."
        },
        "description": {
          "maxLength": 500,
          "minLength": 0,
          "type": [
            "null",
            "string"
          ],
          "description": "The description of the step."
        },
        "properties": {
          "type": [
            "null",
            "object"
          ],
          "description": "Input properties of the step."
        }
      }
    },
    "WorkflowStepConnection": {
      "required": [
        "sourceStepId",
        "targetStepId",
        "outcome"
      ],
      "type": "object",
      "properties": {
        "sourceStepId": {
          "maxLength": 50,
          "minLength": 0,
          "type": [
            "null",
            "string"
          ],
          "description": "The source step ID."
        },
        "targetStepId": {
          "maxLength": 50,
          "minLength": 0,
          "type": [
            "null",
            "string"
          ],
          "description": "The target step ID."
        },
        "outcome": {
          "maxLength": 50,
          "minLength": 0,
          "type": [
            "null",
            "string"
          ],
          "description": "The step outcome."
        }
      }
    }
  }
}