Skip to content

Commit c8db39f

Browse files
committed
feat: update data contract schema to include version 1.2.1 and enhance metric validation
1 parent e5d2807 commit c8db39f

1 file changed

Lines changed: 32 additions & 7 deletions

File tree

datacontract.schema.json

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"type": "string",
88
"title": "DataContractSpecificationVersion",
99
"enum": [
10+
"1.2.1",
1011
"1.2.0",
1112
"1.1.0",
1213
"0.9.3",
@@ -1849,18 +1850,42 @@
18491850
},
18501851
{
18511852
"if": {
1852-
"properties": {
1853-
"type": {
1854-
"const": "library"
1853+
"anyOf": [
1854+
{
1855+
"properties": {
1856+
"type": {
1857+
"const": "library"
1858+
}
1859+
}
1860+
},
1861+
{
1862+
"properties": {
1863+
"metric": {
1864+
"type": "string"
1865+
}
1866+
},
1867+
"required": ["metric"]
18551868
}
1856-
}
1869+
]
18571870
},
18581871
"then": {
18591872
"properties": {
1873+
"metric": {
1874+
"type": "string",
1875+
"description": "The DataQualityLibrary metric to use for the quality check.",
1876+
"enum": ["nullValues", "missingValues", "invalidValues", "duplicateValues", "rowCount"]
1877+
},
18601878
"rule": {
18611879
"type": "string",
1862-
"description": "Define a data quality check based on the predefined rules as per ODCS.",
1863-
"examples": ["duplicateCount", "validValues", "rowCount"]
1880+
"deprecated": true,
1881+
"description": "Deprecated. Use metric instead"
1882+
},
1883+
"arguments": {
1884+
"type": "object",
1885+
"description": "Additional metric-specific parameters for the quality check.",
1886+
"additionalProperties": {
1887+
"type": ["string", "number", "boolean", "array", "object"]
1888+
}
18641889
},
18651890
"mustBe": {
18661891
"description": "Must be equal to the value to be valid. When using numbers, it is equivalent to '='."
@@ -1906,7 +1931,7 @@
19061931
}
19071932
},
19081933
"required": [
1909-
"rule"
1934+
"metric"
19101935
]
19111936
}
19121937
},

0 commit comments

Comments
 (0)