{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-bicep/json-schema/microsoft-bicep-template-spec-version-model-schema.json",
  "title": "TemplateSpecVersionModel",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-bicep-template-spec-versions-api-openapi.yml#/components/schemas/TemplateSpecVersionModel",
  "type": "object",
  "required": [
    "location",
    "properties"
  ],
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true,
      "description": "String ID used to locate any resource on Azure"
    },
    "name": {
      "type": "string",
      "readOnly": true,
      "description": "Name of this resource"
    },
    "type": {
      "type": "string",
      "readOnly": true,
      "description": "Type of this resource"
    },
    "location": {
      "type": "string",
      "description": "The location of the Template Spec version"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Resource tags"
    },
    "systemData": {
      "$ref": "#/$defs/SystemData"
    },
    "properties": {
      "type": "object",
      "required": [
        "mainTemplate"
      ],
      "properties": {
        "description": {
          "type": "string",
          "maxLength": 4096,
          "description": "Template Spec version description"
        },
        "linkedTemplates": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LinkedTemplateArtifact"
          },
          "description": "An array of linked template artifacts"
        },
        "mainTemplate": {
          "type": "object",
          "description": "The main ARM/Bicep compiled template content for this version"
        },
        "metadata": {
          "type": "object",
          "description": "The version metadata. Metadata is an open-ended object and is typically a collection of key-value pairs."
        },
        "uiFormDefinition": {
          "type": "object",
          "description": "The Azure Resource Manager template UI definition content. This can be used to customize the portal deployment experience."
        }
      }
    }
  },
  "$defs": {
    "LinkedTemplateArtifact": {
      "type": "object",
      "required": [
        "path",
        "template"
      ],
      "properties": {
        "path": {
          "type": "string",
          "description": "A filesystem safe relative path of the artifact"
        },
        "template": {
          "type": "object",
          "description": "The ARM/Bicep compiled template content"
        }
      }
    },
    "SystemData": {
      "type": "object",
      "properties": {
        "createdBy": {
          "type": "string",
          "description": "The identity that created the resource"
        },
        "createdByType": {
          "type": "string",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "description": "The type of identity that created the resource"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource creation (UTC)"
        },
        "lastModifiedBy": {
          "type": "string",
          "description": "The identity that last modified the resource"
        },
        "lastModifiedByType": {
          "type": "string",
          "enum": [
            "User",
            "Application",
            "ManagedIdentity",
            "Key"
          ],
          "description": "The type of identity that last modified the resource"
        },
        "lastModifiedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp of resource last modification (UTC)"
        }
      }
    }
  }
}