{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-devops/json-schema/microsoft-azure-devops-git-repository-schema.json",
  "title": "GitRepository",
  "description": "An Azure DevOps Git repository",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-devops-repositories-api-openapi.yml#/components/schemas/GitRepository",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique GUID identifier of the repository"
    },
    "name": {
      "type": "string",
      "description": "Repository name"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "REST API URL for this repository"
    },
    "project": {
      "$ref": "#/$defs/TeamProjectReference"
    },
    "defaultBranch": {
      "type": "string",
      "description": "Default branch of the repository"
    },
    "size": {
      "type": "integer",
      "description": "Size of the repository in bytes"
    },
    "remoteUrl": {
      "type": "string",
      "format": "uri",
      "description": "Remote URL for cloning (HTTPS)"
    },
    "sshUrl": {
      "type": "string",
      "description": "SSH URL for cloning"
    },
    "webUrl": {
      "type": "string",
      "format": "uri",
      "description": "Web browser URL for the repository"
    },
    "parentRepository": {
      "type": [
        "object",
        "null"
      ],
      "description": "Parent repository (if this is a fork)",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "isFork": {
      "type": "boolean",
      "description": "Whether this repository is a fork of another"
    },
    "isDisabled": {
      "type": "boolean",
      "description": "Whether this repository is disabled"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  },
  "$defs": {
    "TeamProjectReference": {
      "type": "object",
      "description": "Reference to an Azure DevOps project",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "state": {
          "type": "string",
          "enum": [
            "deleting",
            "new",
            "wellFormed",
            "createPending",
            "all",
            "unchanged",
            "deleted"
          ]
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ]
        },
        "revision": {
          "type": "integer"
        }
      }
    }
  }
}