|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://schemas.srcos.ai/v2/DataContract.json", |
| 4 | + "title": "DataContract", |
| 5 | + "description": "A governed contract for a DataProduct covering schema, semantics, freshness, quality, privacy, retention, and allowed use.", |
| 6 | + "type": "object", |
| 7 | + "additionalProperties": false, |
| 8 | + "required": ["id", "type", "specVersion", "name", "schemaRefs", "ownerRef", "allowedUses", "sensitivity", "freshness", "qualityRef", "policyRef"], |
| 9 | + "properties": { |
| 10 | + "id": { "type": "string", "pattern": "^urn:srcos:data-contract:" }, |
| 11 | + "type": { "const": "DataContract" }, |
| 12 | + "specVersion": { "type": "string" }, |
| 13 | + "name": { "type": "string", "minLength": 1 }, |
| 14 | + "description": { "type": ["string", "null"] }, |
| 15 | + "ownerRef": { "type": "string", "minLength": 1 }, |
| 16 | + "schemaRefs": { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }, |
| 17 | + "semanticRefs": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true }, |
| 18 | + "allowedUses": { |
| 19 | + "type": "object", |
| 20 | + "additionalProperties": false, |
| 21 | + "required": ["query", "export", "training", "publication"], |
| 22 | + "properties": { |
| 23 | + "query": { "type": "boolean" }, |
| 24 | + "export": { "type": "boolean" }, |
| 25 | + "training": { "type": "boolean" }, |
| 26 | + "publication": { "type": "boolean" }, |
| 27 | + "notes": { "type": ["string", "null"] } |
| 28 | + } |
| 29 | + }, |
| 30 | + "sensitivity": { "enum": ["public", "internal", "restricted", "sensitive", "regulated"] }, |
| 31 | + "freshness": { |
| 32 | + "type": "object", |
| 33 | + "additionalProperties": false, |
| 34 | + "required": ["expectedInterval", "staleAfter"], |
| 35 | + "properties": { |
| 36 | + "expectedInterval": { "type": "string" }, |
| 37 | + "staleAfter": { "type": "string" } |
| 38 | + } |
| 39 | + }, |
| 40 | + "qualityRef": { "type": "string", "pattern": "^urn:srcos:quality-profile:" }, |
| 41 | + "retention": { |
| 42 | + "type": "object", |
| 43 | + "additionalProperties": false, |
| 44 | + "properties": { |
| 45 | + "policyRef": { "type": "string" }, |
| 46 | + "minimumDays": { "type": "integer", "minimum": 0 }, |
| 47 | + "maximumDays": { "type": ["integer", "null"], "minimum": 0 } |
| 48 | + } |
| 49 | + }, |
| 50 | + "policyRef": { "type": "string", "minLength": 1 }, |
| 51 | + "evidenceRefs": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true } |
| 52 | + } |
| 53 | +} |
0 commit comments