{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-devops/json-schema/microsoft-azure-devops-test-plan-schema.json",
  "title": "TestPlan",
  "description": "A test plan in Azure Test Plans",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-devops-test-plans-api-openapi.yml#/components/schemas/TestPlan",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique numeric identifier of the test plan"
    },
    "name": {
      "type": "string",
      "description": "Display name of the test plan"
    },
    "description": {
      "type": "string",
      "description": "Description of the test plan's scope and purpose"
    },
    "state": {
      "type": "string",
      "description": "Current state of the test plan",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "startDate": {
      "type": "string",
      "format": "date-time",
      "description": "Start date of the test plan"
    },
    "endDate": {
      "type": "string",
      "format": "date-time",
      "description": "End date of the test plan"
    },
    "area": {
      "$ref": "#/$defs/TestSuiteReference"
    },
    "areaPath": {
      "type": "string",
      "description": "Area path this test plan is associated with"
    },
    "iteration": {
      "type": "string",
      "description": "Iteration path (sprint) this test plan is associated with"
    },
    "owner": {
      "$ref": "#/$defs/IdentityRef"
    },
    "revision": {
      "type": "integer",
      "description": "Current revision of the test plan"
    },
    "buildDefinition": {
      "type": "object",
      "description": "Build definition associated with this test plan",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "buildId": {
      "type": "integer",
      "description": "Specific build ID to test against"
    },
    "updatedDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time the test plan was last updated"
    },
    "updatedBy": {
      "$ref": "#/$defs/IdentityRef"
    },
    "project": {
      "type": "object",
      "description": "Project this test plan belongs to",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "rootSuite": {
      "$ref": "#/$defs/TestSuiteReference"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "_links": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "href": {
            "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"
        }
      }
    },
    "TestSuiteReference": {
      "type": "object",
      "description": "Minimal reference to a test suite",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}