{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/entityreach-com/json-schema/entityreach-com-group-schema.json",
  "title": "Group",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/entityreach-com-api-openapi.json#/components/schemas/Group",
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "data"
      ],
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GroupNode"
          }
        },
        "source": {
          "$ref": "#/$defs/Source"
        }
      }
    },
    {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GroupNode"
      }
    }
  ],
  "$defs": {
    "GroupNode": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "id": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[0-9]{1,20}$"
            },
            {
              "type": "integer"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "registration_number": {
          "type": "string"
        },
        "selected": {
          "type": "boolean"
        },
        "children": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GroupNode"
          }
        }
      }
    },
    "Source": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "id": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[0-9]{1,20}$"
            },
            {
              "type": "integer"
            }
          ]
        },
        "name": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "url": {
          "type": [
            "string",
            "null"
          ]
        },
        "comment": {
          "type": "string"
        }
      }
    }
  }
}