41 lines
2.0 KiB
JSON
41 lines
2.0 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"required": ["metric-contract", "dataset-snapshot", "analysis-run", "findings", "limitations"],
|
|
"properties": {
|
|
"metric-contract": {
|
|
"type": "object",
|
|
"required": ["metric-id", "version", "grain", "numerator", "denominator", "unit", "timezone", "observation-window", "source-fields"],
|
|
"properties": {
|
|
"metric-id": {"type": "string", "minLength": 1}, "version": {"type": "string", "minLength": 1},
|
|
"grain": {"type": "string", "minLength": 1}, "numerator": {"type": "string", "minLength": 1},
|
|
"denominator": {"type": "string", "minLength": 1}, "unit": {"type": "string", "minLength": 1},
|
|
"timezone": {"type": "string", "minLength": 1}, "observation-window": {"type": "string", "minLength": 1},
|
|
"source-fields": {"type": "array", "minItems": 1}
|
|
}
|
|
},
|
|
"dataset-snapshot": {
|
|
"type": "object",
|
|
"required": ["snapshot-id", "path", "sha256", "schema-version", "row-count", "as-of", "classification"],
|
|
"properties": {
|
|
"snapshot-id": {"type": "string", "minLength": 1}, "path": {"type": "string", "minLength": 1},
|
|
"sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, "schema-version": {"type": "string"},
|
|
"row-count": {"type": "integer", "minimum": 1}, "as-of": {"type": "string", "minLength": 1},
|
|
"classification": {"enum": ["public", "internal", "confidential", "restricted"]}
|
|
}
|
|
},
|
|
"analysis-run": {
|
|
"type": "object",
|
|
"required": ["query-sha256", "environment", "result-sha256", "evidence-receipt-ids"],
|
|
"properties": {
|
|
"query-sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"environment": {"type": "string", "minLength": 1},
|
|
"result-sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
"evidence-receipt-ids": {"type": "array", "minItems": 1, "items": {"type": "string"}}
|
|
}
|
|
},
|
|
"findings": {"type": "array", "minItems": 1},
|
|
"limitations": {"type": "array"}
|
|
}
|
|
}
|