{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-repo/json-schema/microsoft-azure-repo-git-repository-schema.json",
  "title": "GitRepository",
  "description": "Represents a Git repository in Azure DevOps, including its metadata, URLs, project reference, and configuration such as default branch.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-repo-repositories-api-openapi.yml#/components/schemas/GitRepository",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier of the repository"
    },
    "name": {
      "type": "string",
      "description": "Name of the repository"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "REST API URL for the repository"
    },
    "project": {
      "$ref": "#/$defs/TeamProjectReference"
    },
    "defaultBranch": {
      "type": "string",
      "description": "Default branch reference (e.g., refs/heads/main)"
    },
    "remoteUrl": {
      "type": "string",
      "format": "uri",
      "description": "HTTPS clone URL for the repository"
    },
    "sshUrl": {
      "type": "string",
      "description": "SSH clone URL for the repository"
    },
    "webUrl": {
      "type": "string",
      "format": "uri",
      "description": "Web URL to browse the repository in the Azure DevOps portal"
    },
    "size": {
      "type": "integer",
      "format": "int64",
      "description": "Compressed size of the repository in bytes"
    },
    "isFork": {
      "type": "boolean",
      "description": "True if the repository was created as a fork"
    },
    "isDisabled": {
      "type": "boolean",
      "description": "True if the repository is disabled"
    },
    "isInMaintenance": {
      "type": "boolean",
      "description": "True if the repository is in maintenance mode"
    },
    "parentRepository": {
      "$ref": "#/$defs/GitRepositoryRef"
    },
    "_links": {
      "type": "object",
      "description": "HAL reference links",
      "additionalProperties": true
    }
  },
  "$defs": {
    "GitRepositoryRef": {
      "type": "object",
      "description": "Shallow reference to a Git repository",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Repository ID"
        },
        "name": {
          "type": "string",
          "description": "Repository name"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "REST API URL"
        },
        "project": {
          "$ref": "#/$defs/TeamProjectReference"
        },
        "isFork": {
          "type": "boolean",
          "description": "True if the repository was created as a fork"
        },
        "remoteUrl": {
          "type": "string",
          "description": "HTTPS clone URL"
        },
        "sshUrl": {
          "type": "string",
          "description": "SSH clone URL"
        },
        "collection": {
          "$ref": "#/$defs/TeamProjectCollectionReference"
        }
      }
    },
    "TeamProjectCollectionReference": {
      "type": "object",
      "description": "Reference to a Team Project Collection",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Collection ID"
        },
        "name": {
          "type": "string",
          "description": "Collection name"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "REST API URL for the collection"
        }
      }
    },
    "TeamProjectReference": {
      "type": "object",
      "description": "Shallow reference to an Azure DevOps team project",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Project ID"
        },
        "name": {
          "type": "string",
          "description": "Project name"
        },
        "description": {
          "type": "string",
          "description": "Project description"
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "REST API URL for the project"
        },
        "state": {
          "type": "string",
          "enum": [
            "deleting",
            "new",
            "wellFormed",
            "createPending",
            "all",
            "unchanged",
            "deleted"
          ],
          "description": "Current state of the project"
        },
        "visibility": {
          "type": "string",
          "enum": [
            "private",
            "public"
          ],
          "description": "Visibility of the project"
        },
        "revision": {
          "type": "integer",
          "format": "int64",
          "description": "Project revision number"
        },
        "lastUpdateTime": {
          "type": "string",
          "format": "date-time",
          "description": "Last update time"
        }
      }
    }
  }
}