Azure DevOps · JSON Structure

Azure Dev Ops Code Repository Structure

Repository containing the source code for a pipeline.

Type: object Properties: 5 Required: 3
AzureCI/CDDevOpsProject ManagementVersion Control

CodeRepository is a JSON Structure definition published by Azure DevOps, describing 5 properties, of which 3 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

authorization defaultBranch id properties repositoryType

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/azure-dev-ops/refs/heads/main/json-structure/azure-dev-ops-code-repository-structure.json",
  "description": "Repository containing the source code for a pipeline.",
  "type": "object",
  "properties": {
    "authorization": {
      "$ref": "#/definitions/Authorization",
      "description": "Authorization info to access the code repository."
    },
    "defaultBranch": {
      "description": "Default branch used to configure Continuous Integration (CI) in the pipeline.",
      "type": "string"
    },
    "id": {
      "description": "Unique immutable identifier of the code repository.",
      "type": "string"
    },
    "properties": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Repository-specific properties.",
      "type": "object",
      "x-ms-client-flatten": true
    },
    "repositoryType": {
      "description": "Type of code repository.",
      "enum": [
        "gitHub",
        "vstsGit"
      ],
      "type": "string",
      "x-ms-enum": {
        "modelAsString": true,
        "name": "CodeRepositoryType"
      }
    }
  },
  "required": [
    "repositoryType",
    "id",
    "defaultBranch"
  ],
  "name": "CodeRepository"
}