{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-repo/json-schema/microsoft-azure-repo-git-pull-request-comment-thread-schema.json",
  "title": "GitPullRequestCommentThread",
  "description": "A comment thread on a pull request, optionally associated with a specific file and line range for inline code review.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-repo-pull-request-threads-api-openapi.yml#/components/schemas/GitPullRequestCommentThread",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int32",
      "description": "Unique ID of the thread"
    },
    "publishedDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date the thread was published"
    },
    "lastUpdatedDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date the thread was last updated"
    },
    "status": {
      "type": "string",
      "enum": [
        "unknown",
        "active",
        "fixed",
        "wontFix",
        "closed",
        "byDesign",
        "pending"
      ],
      "description": "Resolution status of the thread"
    },
    "comments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "parentCommentId": {
            "type": "integer",
            "format": "int32"
          },
          "content": {
            "type": "string"
          },
          "publishedDate": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdatedDate": {
            "type": "string",
            "format": "date-time"
          },
          "author": {
            "$ref": "#/$defs/IdentityRef"
          },
          "commentType": {
            "type": "string",
            "enum": [
              "unknown",
              "text",
              "codeChange",
              "system"
            ]
          }
        }
      }
    },
    "threadContext": {
      "type": "object",
      "description": "File path and line range for inline comments",
      "properties": {
        "filePath": {
          "type": "string"
        },
        "rightFileStart": {
          "type": "object",
          "properties": {
            "line": {
              "type": "integer"
            },
            "offset": {
              "type": "integer"
            }
          }
        },
        "rightFileEnd": {
          "type": "object",
          "properties": {
            "line": {
              "type": "integer"
            },
            "offset": {
              "type": "integer"
            }
          }
        }
      }
    },
    "properties": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "$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"
        }
      }
    }
  }
}