{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/acculynx/json-schema/acculynx-lead-source-schema.json",
  "title": "leadSource",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/acculynx-company-api-openapi.yml#/components/schemas/leadSource",
  "allOf": [
    {
      "$ref": "#/$defs/leadSourceLink"
    },
    {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "children": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/leadSourceChild"
          }
        }
      }
    }
  ],
  "$defs": {
    "leadSourceChild": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "parentId": {
          "type": "string",
          "format": "uuid"
        },
        "_link": {
          "type": "string",
          "description": "The URI of the LeadSource."
        }
      }
    },
    "leadSourceLink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "_link": {
          "type": "string",
          "description": "The URI of the LeadSource."
        }
      }
    }
  }
}