{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-devops/json-schema/microsoft-azure-devops-git-pull-request-comment-thread-schema.json",
  "title": "GitPullRequestCommentThread",
  "description": "A comment thread on a pull request",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-devops-pull-requests-api-openapi.yml#/components/schemas/GitPullRequestCommentThread",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Thread ID"
    },
    "publishedDate": {
      "type": "string",
      "format": "date-time"
    },
    "lastUpdatedDate": {
      "type": "string",
      "format": "date-time"
    },
    "comments": {
      "type": "array",
      "description": "Comments in this thread",
      "items": {
        "$ref": "#/$defs/Comment"
      }
    },
    "status": {
      "type": "string",
      "description": "Thread status",
      "enum": [
        "unknown",
        "active",
        "byDesign",
        "closed",
        "fixed",
        "wontFix",
        "pending"
      ]
    },
    "threadContext": {
      "type": "object",
      "description": "Location in the diff where this thread was created",
      "properties": {
        "filePath": {
          "type": "string"
        },
        "rightFileStart": {
          "type": "object",
          "properties": {
            "line": {
              "type": "integer"
            },
            "offset": {
              "type": "integer"
            }
          }
        },
        "rightFileEnd": {
          "type": "object",
          "properties": {
            "line": {
              "type": "integer"
            },
            "offset": {
              "type": "integer"
            }
          }
        }
      }
    },
    "pullRequestThreadContext": {
      "type": "object",
      "description": "Pull request context for the thread"
    },
    "isDeleted": {
      "type": "boolean"
    },
    "url": {
      "type": "string",
      "format": "uri"
    }
  },
  "$defs": {
    "Comment": {
      "type": "object",
      "description": "A comment in a pull request thread",
      "properties": {
        "id": {
          "type": "integer"
        },
        "parentCommentId": {
          "type": "integer"
        },
        "content": {
          "type": "string"
        },
        "publishedDate": {
          "type": "string",
          "format": "date-time"
        },
        "lastUpdatedDate": {
          "type": "string",
          "format": "date-time"
        },
        "lastContentUpdatedDate": {
          "type": "string",
          "format": "date-time"
        },
        "commentType": {
          "type": "string",
          "enum": [
            "unknown",
            "text",
            "codeChange",
            "system"
          ]
        },
        "author": {
          "$ref": "#/$defs/IdentityRef"
        },
        "isDeleted": {
          "type": "boolean"
        },
        "usersLiked": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IdentityRef"
          }
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "IdentityRef": {
      "type": "object",
      "description": "Reference to an Azure DevOps user identity",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "displayName": {
          "type": "string"
        },
        "uniqueName": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "imageUrl": {
          "type": "string",
          "format": "uri"
        },
        "descriptor": {
          "type": "string"
        }
      }
    }
  }
}