{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/absence-io/json-schema/absence-io-department-list-response-schema.json",
  "title": "DepartmentListResponse",
  "description": "Paginated list response containing department records.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/absence-io-departments-api-openapi.yml#/components/schemas/DepartmentListResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "description": "Array of department records.",
      "items": {
        "$ref": "#/$defs/Department"
      }
    },
    "skip": {
      "type": "integer"
    },
    "limit": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    }
  },
  "$defs": {
    "Department": {
      "title": "Department",
      "description": "An organizational department.",
      "type": "object",
      "properties": {
        "_id": {
          "type": "string",
          "description": "Unique identifier of the department."
        },
        "name": {
          "type": "string",
          "description": "Name of the department."
        },
        "managerId": {
          "type": "string",
          "description": "ID of the department manager."
        },
        "parentId": {
          "type": "string",
          "description": "ID of the parent department if hierarchical."
        }
      }
    }
  }
}