{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animam-ai/json-schema/animam-ai-segment-detail-schema.json",
  "title": "SegmentDetail",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animam-ai-openapi.json#/components/schemas/SegmentDetail",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "systemPrompt": {
      "type": "string"
    },
    "welcomeMessage": {
      "type": [
        "string",
        "null"
      ]
    },
    "formConfig": {
      "$ref": "#/$defs/FormConfig"
    },
    "isDefault": {
      "type": "boolean"
    },
    "isActive": {
      "type": "boolean"
    }
  },
  "required": [
    "slug",
    "name",
    "systemPrompt",
    "welcomeMessage",
    "formConfig",
    "isDefault",
    "isActive"
  ],
  "$defs": {
    "FormConfig": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "intent": {
          "type": "string"
        },
        "confirmationMessage": {
          "type": "string"
        },
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FormField"
          }
        }
      },
      "required": [
        "enabled",
        "intent",
        "fields"
      ]
    },
    "FormField": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "text",
            "email",
            "phone",
            "textarea"
          ]
        },
        "required": {
          "type": "boolean"
        }
      },
      "required": [
        "name",
        "label",
        "type",
        "required"
      ]
    }
  }
}