{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-purview/json-schema/microsoft-purview-data-quality-rule-schema.json",
  "title": "DataQualityRule",
  "description": "A data quality rule definition",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-purview-data-quality-rules-api-openapi.yml#/components/schemas/DataQualityRule",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "ruleType": {
      "type": "string",
      "enum": [
        "Completeness",
        "Uniqueness",
        "Freshness",
        "Accuracy",
        "Consistency",
        "Validity"
      ]
    },
    "expression": {
      "type": "string"
    },
    "dimension": {
      "type": "string"
    },
    "severity": {
      "type": "string",
      "enum": [
        "Low",
        "Medium",
        "High",
        "Critical"
      ]
    },
    "isEnabled": {
      "type": "boolean"
    },
    "targetAssets": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}