{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/runn/json-schema/runn-collection-person-schema.json",
  "title": "CollectionPerson",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/runn-skills-api-openapi.yml#/components/schemas/CollectionPerson",
  "type": "object",
  "properties": {
    "id": {
      "type": "number"
    },
    "firstName": {
      "type": "string"
    },
    "lastName": {
      "type": "string"
    },
    "email": {
      "type": [
        "string",
        "null"
      ]
    },
    "isArchived": {
      "type": "boolean"
    },
    "teamId": {
      "type": [
        "integer",
        "null"
      ]
    },
    "references": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Reference"
      }
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      }
    },
    "holidaysGroupId": {
      "type": [
        "number",
        "null"
      ]
    },
    "managers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "description": "The ID referencing the user managing the person.",
            "type": "integer"
          }
        },
        "required": [
          "id"
        ]
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of when the object was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of when the object was last updated."
    }
  },
  "required": [
    "id",
    "firstName",
    "lastName",
    "email",
    "isArchived",
    "teamId",
    "references",
    "tags",
    "holidaysGroupId",
    "managers",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "Reference": {
      "type": "object",
      "properties": {
        "referenceName": {
          "minLength": 1,
          "type": "string"
        },
        "externalId": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "referenceName",
        "externalId"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ]
    }
  }
}