{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amigo/main/json-schema/amigo-external-role-assignment-item-schema.json",
  "title": "ExternalRoleAssignmentItem",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amigo-external-role-assignments-api-openapi.yml#/components/schemas/ExternalRoleAssignmentItem",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id"
    },
    "source": {
      "type": "string",
      "title": "Source"
    },
    "external_subject_key": {
      "type": "string",
      "title": "External Subject Key"
    },
    "external_subject_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "External Subject Id"
    },
    "entity_id": {
      "type": "string",
      "format": "uuid",
      "title": "Entity Id"
    },
    "display_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Display Name"
    },
    "roles": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Roles"
    },
    "roles_verified": {
      "type": "boolean",
      "title": "Roles Verified"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "suspended",
        "revoked"
      ],
      "title": "Status"
    },
    "provisioned_via": {
      "type": "string",
      "enum": [
        "roster_sync",
        "jit"
      ],
      "title": "Provisioned Via"
    },
    "last_verified_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Last Verified At"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "title": "Updated At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "source",
    "external_subject_key",
    "entity_id",
    "roles",
    "roles_verified",
    "status",
    "provisioned_via",
    "created_at",
    "updated_at"
  ]
}