-
Notifications
You must be signed in to change notification settings - Fork 0
/
contract_schema.json
59 lines (59 loc) · 1.95 KB
/
contract_schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://example.com/contract_schema.json",
"title": "Contract Schema",
"description": "Schema for data contracts",
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"schema": { "type": "string" },
"id": { "type": "string", "minLength": 1 },
"title": { "type": "string" },
"description": { "type": "string" },
"version": { "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$" },
"created": { "type": "string", "format": "date-time" },
"updated": { "type": "string", "format": "date-time" },
"language": { "type": "string" },
"license": { "type": "string" },
"dataOwner": {
"type": "object",
"properties": {
"name": { "type": "string" },
"email": { "type": "string", "format": "email" }
},
"required": ["name", "email"]
}
},
"required": ["schema", "id", "title", "description", "version", "created", "updated", "language", "license", "dataOwner"]
},
"data": {
"type": "object",
"properties": {
"type": { "type": "string" },
"items": {
"type": "object",
"properties": {
"type": { "type": "string" },
"properties": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"type": { "type": "string" },
"format": { "type": "string" },
"minLength": { "type": "integer", "minimum": 0 },
"minimum": { "type": "integer" }
}
}
},
"required": { "type": "array", "items": { "type": "string" } }
}
}
},
"required": ["type", "items"]
}
},
"required": ["meta", "data"]
}