{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/runn/json-schema/runn-role-schema.json",
  "title": "Role",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/runn-roles-api-openapi.yml#/components/schemas/Role",
  "type": "object",
  "properties": {
    "id": {
      "minimum": 0,
      "type": "integer"
    },
    "name": {
      "type": [
        "string",
        "null"
      ]
    },
    "isArchived": {
      "type": "boolean"
    },
    "defaultHourCost": {
      "type": "number"
    },
    "standardRate": {
      "type": "number"
    },
    "references": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Reference"
      }
    },
    "personIds": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    },
    "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",
    "name",
    "isArchived",
    "defaultHourCost",
    "standardRate",
    "references",
    "personIds",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "Reference": {
      "type": "object",
      "properties": {
        "referenceName": {
          "minLength": 1,
          "type": "string"
        },
        "externalId": {
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "referenceName",
        "externalId"
      ]
    }
  }
}