{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-devops-health/json-schema/azure-devops-health-metadata-entity-schema.json",
  "title": "MetadataEntity",
  "description": "The metadata entity contract.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-devops-health-metadata-api-openapi.yml#/components/schemas/MetadataEntity",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/MetadataEntityProperties",
      "description": "The metadata entity properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/TypesProxyResource"
    }
  ],
  "$defs": {
    "MetadataEntityProperties": {
      "type": "object",
      "description": "The metadata entity properties",
      "properties": {
        "displayName": {
          "type": "string",
          "description": "The display name."
        },
        "dependsOn": {
          "type": "array",
          "description": "The list of keys on which this entity depends on.",
          "items": {
            "type": "string"
          }
        },
        "applicableScenarios": {
          "type": "array",
          "description": "The list of scenarios applicable to this metadata entity.",
          "items": {
            "$ref": "#/$defs/Scenario"
          }
        },
        "supportedValues": {
          "type": "array",
          "description": "The list of supported values.",
          "items": {
            "$ref": "#/$defs/MetadataSupportedValueDetail"
          }
        }
      }
    },
    "MetadataSupportedValueDetail": {
      "type": "object",
      "description": "The metadata supported value detail.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The id of the metadata value"
        },
        "previousId": {
          "type": "string",
          "description": "The previous value of the id field in case the data has changed."
        },
        "serviceGuid": {
          "type": "string",
          "description": "The permanent guid for the service. Used when the id is a service name."
        },
        "displayName": {
          "type": "string",
          "description": "The display name."
        },
        "resourceTypes": {
          "type": "array",
          "description": "The list of associated resource types.",
          "items": {
            "type": "string"
          }
        },
        "priority": {
          "type": "integer",
          "format": "int32",
          "description": "Priority of this metadata supported value. Lower number is given higher preference."
        }
      }
    },
    "Scenario": {
      "type": "string",
      "enum": [
        "Alerts"
      ],
      "x-ms-enum": {
        "name": "Scenario",
        "modelAsString": true,
        "values": [
          {
            "name": "Alerts",
            "value": "Alerts",
            "description": "Alerts"
          }
        ]
      }
    },
    "TypesProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    }
  }
}