-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcodelist-schema.json
More file actions
177 lines (177 loc) · 5.27 KB
/
codelist-schema.json
File metadata and controls
177 lines (177 loc) · 5.27 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Codelist schema",
"description": "Schema for codelist CSV files.",
"type": "array",
"items": {
"$ref": "#/definitions/Row"
},
"definitions": {
"Row": {
"title": "Row",
"type": "object",
"required": [
"Code",
"Title",
"Description"
],
"additionalProperties": false,
"properties": {
"Code": {
"title": "Code",
"description": "The value to use in data. Codes should match the letter case of external codes (e.g. ISO 4217, JSON Schema, GeoJSON, IANA Media Types) and should be camel case, otherwise.",
"type": "string",
"pattern": "^(([a-z]+|oc4ids)([A-Z][a-z]+|EU|GPP)*(\\.[a-z]+([A-Z][a-z]+)*)?|[A-Z]+[0-9]?|[A-Z]{2}(-[A-Z]+)+|TED(_[A-Z]+)+|(eu|fsr)(-[a-z]+)+|date-time|LineString|Point|Polygon|MultiLineString|MultiPoint|MultiPolygon|(offline|application|audio|font|example|image|message|model|multipart|text|video)/[\\w.+-]+|pre-award)$"
},
"Title": {
"title": "Title",
"description": "A short title for the code.",
"type": "string",
"minLength": 1
},
"Description": {
"title": "Description",
"description": "A longer description of the code.",
"type": "string",
"minLength": 1
},
"Deprecated": {
"title": "Deprecated",
"description": "The minor version (or patch version under 0.x) in which the code was deprecated.",
"type": [
"string",
"null"
],
"pattern": "^(\\d+\\.\\d+|0\\.\\d+\\.\\d+)$"
},
"Deprecation note": {
"title": "Deprecation note",
"description": "The reason for the deprecation, and any guidance.",
"type": [
"string",
"null"
],
"minLength": 1
},
"Business Logic": {
"title": "Business Logic",
"description": "A description of how this field's value relates to the values of other fields.",
"type": [
"string",
"null"
],
"minLength": 1
},
"Category": {
"title": "Category",
"description": "A single category by which to filter codes. The extension's documentation should explain the categorization system.",
"type": [
"string",
"null"
],
"minLength": 1
},
"Extension": {
"title": "Extension",
"description": "The title of the extension from which the code is sourced, or 'OCDS Core'.",
"type": [
"string",
"null"
],
"minLength": 1
},
"Framework": {
"title": "Framework",
"description": "A reference to The World Bank Framework for Disclosure in Public Private Partnership Projects.",
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"pattern": "^[XVI]+(\\.\\d+)+$"
},
"uniqueItems": true
},
"Notes": {
"title": "Notes",
"description": "Notes on the application of the code.",
"type": "string",
"pattern": "^milestone/type = [A-Za-z]+$"
},
"Section": {
"title": "Section",
"description": "The only OCDS objects in which this documentType code should be used. (This field is a ', '-delimited value in the CSV file.)",
"type": [
"array",
"null"
],
"minItems": 1,
"items": {
"type": "string",
"enum": [
"award",
"bid",
"bidder",
"contract",
"implementation",
"planning",
"preQualification",
"tender"
]
},
"uniqueItems": true
},
"Source": {
"title": "Source",
"description": "The third-party source for the code.",
"oneOf": [
{
"type": [
"string",
"null"
],
"format": "uri"
},
{
"type": "string",
"enum": [
"OC4IDS",
"OCDS",
"OCDS for PPPs"
]
}
]
},
"Summary required": {
"title": "Summary required",
"description": "",
"type": "string",
"enum": [
"No",
"Yes"
]
},
"URI Pattern": {
"title": "URI Pattern",
"description": "The pattern to which URLs following this scheme should adhere.",
"type": [
"string",
"null"
],
"format": "uri"
},
"Valid Until": {
"title": "Valid Until",
"description": "The date past which the code is no longer valid for use.",
"type": [
"string",
"null"
],
"pattern": "^(\\d{4}/\\d{4}|\\d{4}-\\d{2}(/\\d{4}-\\d{2})?)$"
}
},
"minProperties": 1
}
},
"minItems": 1,
"uniqueItems": true
}