{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-devops/json-schema/microsoft-azure-devops-git-ref-schema.json",
  "title": "GitRef",
  "description": "A Git ref (branch or tag)",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-devops-refs-api-openapi.yml#/components/schemas/GitRef",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Full ref name (e.g., refs/heads/main)"
    },
    "objectId": {
      "type": "string",
      "description": "The commit SHA this ref points to"
    },
    "creator": {
      "$ref": "#/$defs/IdentityRef"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "statuses": {
      "type": "array",
      "description": "Commit status checks for this ref",
      "items": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "error",
              "failed",
              "notApplicable",
              "notSet",
              "pending",
              "succeeded"
            ]
          },
          "description": {
            "type": "string"
          },
          "context": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "genre": {
                "type": "string"
              }
            }
          },
          "targetUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  },
  "$defs": {
    "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"
        }
      }
    }
  }
}