Skip to content

Commit ee2076d

Browse files
committed
Add minProperties, minItems and/or minLength properties
1 parent 3d9a7de commit ee2076d

File tree

2 files changed

+26
-11
lines changed

2 files changed

+26
-11
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ Report issues for this extension in the [ocds-extensions repository](https://git
101101

102102
## Changelog
103103

104+
### 2020-04-24
105+
106+
* Add `minProperties`, `minItems` and/or `minLength` properties.
107+
104108
### 2019-03-20
105109

106110
* Set `"uniqueItems": true` on array fields, and add `"minLength": 1` on required string fields.

release-schema.json

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"items": {
1010
"$ref": "#/definitions/Tariff"
1111
},
12-
"uniqueItems": true
12+
"uniqueItems": true,
13+
"minItems": 1
1314
}
1415
}
1516
},
@@ -22,7 +23,8 @@
2223
"items": {
2324
"$ref": "#/definitions/Tariff"
2425
},
25-
"uniqueItems": true
26+
"uniqueItems": true,
27+
"minItems": 1
2628
}
2729
}
2830
},
@@ -46,7 +48,8 @@
4648
"type": [
4749
"string",
4850
"null"
49-
]
51+
],
52+
"minLength": 1
5053
},
5154
"paidBy": {
5255
"title": "Paid by",
@@ -84,7 +87,8 @@
8487
"null"
8588
],
8689
"title": "Unit name",
87-
"description": "The name of the unit that the tariff is charged against. E.g. tonnes,"
90+
"description": "The name of the unit that the tariff is charged against. E.g. tonnes,",
91+
"minLength": 1
8892
},
8993
"scheme": {
9094
"title": "Scheme",
@@ -94,15 +98,17 @@
9498
"null"
9599
],
96100
"codelist": "unitClassificationScheme.csv",
97-
"openCodelist": true
101+
"openCodelist": true,
102+
"minLength": 1
98103
},
99104
"id": {
100105
"title": "ID",
101106
"description": "The identifier from the codelist referenced in the schema property. For example, with UNCEFACT, this is the value of the 'Common Code' column. From this identifier, applications can look-up the human readable name or symbol for this unit of measure. ",
102107
"type": [
103108
"string",
104109
"null"
105-
]
110+
],
111+
"minLength": 1
106112
},
107113
"uri": {
108114
"title": "URI",
@@ -113,7 +119,8 @@
113119
],
114120
"format": "uri"
115121
}
116-
}
122+
},
123+
"minProperties": 1
117124
},
118125
"dimensions": {
119126
"type": "object",
@@ -124,19 +131,23 @@
124131
"type": [
125132
"string",
126133
"null"
127-
]
134+
],
135+
"minLength": 1
128136
}
129-
}
137+
},
138+
"minProperties": 1
130139
},
131140
"notes": {
132141
"title": "Tariff notes",
133142
"description": "Any notes on this tariff line item. This may include clarifying information.",
134143
"type": [
135144
"string",
136145
"null"
137-
]
146+
],
147+
"minLength": 1
138148
}
139-
}
149+
},
150+
"minProperties": 1
140151
}
141152
}
142153
}

0 commit comments

Comments
 (0)