{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tale-dev/json-schema/tale-dev-external-status-workflow-schema.json",
  "title": "ExternalStatusWorkflow",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tale-dev-tasks-api-openapi.yml#/components/schemas/ExternalStatusWorkflow",
  "type": "object",
  "properties": {
    "actions": {
      "maxItems": 16,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "i18n": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "description": {
                  "type": "string",
                  "maxLength": 2000
                }
              },
              "additionalProperties": false
            }
          },
          "id": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_]{0,63}$"
          },
          "status": {
            "type": "string",
            "enum": [
              "backlog",
              "todo",
              "in_progress",
              "in_review",
              "done",
              "cancelled"
            ]
          },
          "fields": {
            "default": [],
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "maxLength": 64,
                  "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "number",
                    "boolean",
                    "select"
                  ]
                },
                "required": {
                  "type": "boolean"
                },
                "pattern": {
                  "type": "string",
                  "maxLength": 500
                },
                "default": {
                  "type": "string",
                  "maxLength": 4000
                },
                "placeholder": {
                  "type": "string",
                  "maxLength": 200
                },
                "help": {
                  "type": "string",
                  "maxLength": 500
                },
                "options": {
                  "minItems": 1,
                  "maxItems": 1000,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "value": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "i18n": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            }
                          },
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "value",
                      "label"
                    ],
                    "additionalProperties": false
                  }
                },
                "i18n": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "placeholder": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "help": {
                        "type": "string",
                        "maxLength": 500
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "multiline": {
                  "type": "boolean"
                }
              },
              "required": [
                "key",
                "label",
                "type"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "title",
          "id",
          "status"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "actions"
  ],
  "additionalProperties": false
}