{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/github/json-schema/github-copilot-space-collaborator-schema.json",
  "title": "Copilot Space Collaborator",
  "description": "A collaborator (user or team) of a Copilot Space",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/github-copilot-spaces-api-openapi.yml#/components/schemas/copilot-space-collaborator",
  "type": "object",
  "anyOf": [
    {
      "allOf": [
        {
          "$ref": "#/$defs/simple-user"
        },
        {
          "type": "object",
          "properties": {
            "actor_type": {
              "type": "string",
              "enum": [
                "User"
              ],
              "description": "The collaborator actor type."
            },
            "role": {
              "type": "string",
              "enum": [
                "reader",
                "writer",
                "admin"
              ],
              "description": "The role granted to the collaborator"
            }
          },
          "required": [
            "actor_type",
            "role"
          ]
        }
      ]
    },
    {
      "type": "object",
      "properties": {
        "actor_type": {
          "type": "string",
          "enum": [
            "Team"
          ],
          "description": "The collaborator actor type."
        },
        "role": {
          "type": "string",
          "enum": [
            "reader",
            "writer",
            "admin"
          ],
          "description": "The role granted to the collaborator"
        },
        "id": {
          "type": "integer"
        },
        "node_id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "Team"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "privacy": {
          "type": "string"
        },
        "notification_setting": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "html_url": {
          "type": "string",
          "format": "uri"
        },
        "members_url": {
          "type": "string"
        },
        "repositories_url": {
          "type": "string",
          "format": "uri"
        },
        "organization_id": {
          "type": "integer"
        },
        "parent": {}
      },
      "required": [
        "actor_type",
        "role",
        "id",
        "node_id",
        "name",
        "slug",
        "type"
      ]
    }
  ],
  "$defs": {
    "simple-user": {
      "title": "Simple User",
      "description": "A GitHub user.",
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "email": {
          "type": [
            "string",
            "null"
          ]
        },
        "login": {
          "type": "string"
        },
        "id": {
          "type": "integer",
          "format": "int64"
        },
        "node_id": {
          "type": "string"
        },
        "avatar_url": {
          "type": "string",
          "format": "uri"
        },
        "gravatar_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "html_url": {
          "type": "string",
          "format": "uri"
        },
        "followers_url": {
          "type": "string",
          "format": "uri"
        },
        "following_url": {
          "type": "string"
        },
        "gists_url": {
          "type": "string"
        },
        "starred_url": {
          "type": "string"
        },
        "subscriptions_url": {
          "type": "string",
          "format": "uri"
        },
        "organizations_url": {
          "type": "string",
          "format": "uri"
        },
        "repos_url": {
          "type": "string",
          "format": "uri"
        },
        "events_url": {
          "type": "string"
        },
        "received_events_url": {
          "type": "string",
          "format": "uri"
        },
        "type": {
          "type": "string"
        },
        "site_admin": {
          "type": "boolean"
        },
        "starred_at": {
          "type": "string"
        },
        "user_view_type": {
          "type": "string"
        }
      },
      "required": [
        "avatar_url",
        "events_url",
        "followers_url",
        "following_url",
        "gists_url",
        "gravatar_id",
        "html_url",
        "id",
        "node_id",
        "login",
        "organizations_url",
        "received_events_url",
        "repos_url",
        "site_admin",
        "starred_url",
        "subscriptions_url",
        "type",
        "url"
      ]
    }
  }
}