{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-repo/json-schema/microsoft-azure-repo-identity-ref-with-vote-schema.json",
  "title": "IdentityRefWithVote",
  "description": "Identity information including a vote on a pull request. Vote values are 10 (approved), 5 (approved with suggestions), 0 (no vote), -5 (waiting for author), -10 (rejected).",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-repo-pull-request-reviewers-api-openapi.yml#/components/schemas/IdentityRefWithVote",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/IdentityRef"
    },
    {
      "type": "object",
      "properties": {
        "vote": {
          "type": "integer",
          "format": "int16",
          "description": "Vote value: 10=approved, 5=approved with suggestions, 0=no vote, -5=waiting for author, -10=rejected"
        },
        "reviewerUrl": {
          "type": "string",
          "format": "uri",
          "description": "URL to retrieve reviewer information"
        },
        "hasDeclined": {
          "type": "boolean",
          "description": "Whether the reviewer has declined to review"
        },
        "isFlagged": {
          "type": "boolean",
          "description": "Whether the reviewer is flagged for attention"
        },
        "isRequired": {
          "type": "boolean",
          "description": "Whether this is a required reviewer"
        },
        "votedFor": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IdentityRefWithVote"
          },
          "description": "Groups or teams this reviewer contributed to"
        }
      }
    }
  ],
  "$defs": {
    "IdentityRef": {
      "type": "object",
      "description": "Reference to an Azure DevOps identity (user or group)",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identity ID"
        },
        "displayName": {
          "type": "string",
          "description": "Display name of the identity"
        },
        "uniqueName": {
          "type": "string",
          "description": "Unique name (typically email)"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "REST API URL for this identity"
        },
        "imageUrl": {
          "type": "string",
          "format": "uri",
          "description": "URL to the identity's avatar image"
        },
        "descriptor": {
          "type": "string",
          "description": "Graph descriptor for the identity"
        },
        "isContainer": {
          "type": "boolean",
          "description": "Whether this identity is a group"
        }
      }
    },
    "IdentityRefWithVote": {
      "type": "object",
      "description": "Identity information including a vote on a pull request. Vote values are 10 (approved), 5 (approved with suggestions), 0 (no vote), -5 (waiting for author), -10 (rejected).",
      "allOf": [
        {
          "$ref": "#/$defs/IdentityRef"
        },
        {
          "type": "object",
          "properties": {
            "vote": {
              "type": "integer",
              "format": "int16",
              "description": "Vote value: 10=approved, 5=approved with suggestions, 0=no vote, -5=waiting for author, -10=rejected"
            },
            "reviewerUrl": {
              "type": "string",
              "format": "uri",
              "description": "URL to retrieve reviewer information"
            },
            "hasDeclined": {
              "type": "boolean",
              "description": "Whether the reviewer has declined to review"
            },
            "isFlagged": {
              "type": "boolean",
              "description": "Whether the reviewer is flagged for attention"
            },
            "isRequired": {
              "type": "boolean",
              "description": "Whether this is a required reviewer"
            },
            "votedFor": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/IdentityRefWithVote"
              },
              "description": "Groups or teams this reviewer contributed to"
            }
          }
        }
      ]
    }
  }
}