@pdtf/schemas 0.11.0-4 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,8 +17,7 @@
17
17
  },
18
18
  "transactionId": {
19
19
  "title": "UUID for the transaction",
20
- "type": "string",
21
- "format": "uuid"
20
+ "type": "string"
22
21
  },
23
22
  "status": {
24
23
  "type": "string",
@@ -133,11 +132,8 @@
133
132
  "titleExtents": {
134
133
  "RDSRef": "",
135
134
  "title": "Title Extents",
136
- "description": "One or more index polygons describing indicative location of registered title from National Polygon Dataset",
137
- "type": "array",
138
- "items": {
139
- "$ref": "https://geojson.org/schema/GeoJSON.json"
140
- }
135
+ "description": "One or more index polygons describing indicative location of registered title from National Polygon Dataset, JSON.stringified to ensure compatibility",
136
+ "type": "string"
141
137
  },
142
138
  "registerExtract": {
143
139
  "title": "HMLR Register Extract",
@@ -199,33 +199,29 @@
199
199
  }
200
200
  },
201
201
  "required": ["yesNo"],
202
- "dependencies": {
203
- "yesNo": {
204
- "oneOf": [
205
- {
206
- "properties": {
207
- "yesNo": {
208
- "enum": ["No"]
209
- }
210
- },
211
- "additionalProperties": false
202
+ "discriminator": { "propertyName": "yesNo" },
203
+ "oneOf": [
204
+ {
205
+ "properties": {
206
+ "yesNo": {
207
+ "enum": ["No"]
208
+ }
209
+ }
210
+ },
211
+ {
212
+ "properties": {
213
+ "yesNo": {
214
+ "enum": ["Yes"]
212
215
  },
213
- {
214
- "properties": {
215
- "yesNo": {
216
- "enum": ["Yes"]
217
- },
218
- "details": {
219
- "title": "Details",
220
- "type": "string",
221
- "minLength": 1
222
- }
223
- },
224
- "required": ["details"]
216
+ "details": {
217
+ "title": "Details",
218
+ "type": "string",
219
+ "minLength": 1
225
220
  }
226
- ]
221
+ },
222
+ "required": ["details"]
227
223
  }
228
- }
224
+ ]
229
225
  },
230
226
  "yesNoDetailIfNo": {
231
227
  "type": "object",
@@ -237,33 +233,29 @@
237
233
  }
238
234
  },
239
235
  "required": ["yesNo"],
240
- "dependencies": {
241
- "yesNo": {
242
- "oneOf": [
243
- {
244
- "properties": {
245
- "yesNo": {
246
- "enum": ["Yes"]
247
- }
248
- },
249
- "additionalProperties": false
236
+ "discriminator": { "propertyName": "yesNo" },
237
+ "oneOf": [
238
+ {
239
+ "properties": {
240
+ "yesNo": {
241
+ "enum": ["Yes"]
242
+ }
243
+ }
244
+ },
245
+ {
246
+ "properties": {
247
+ "yesNo": {
248
+ "enum": ["No"]
250
249
  },
251
- {
252
- "properties": {
253
- "yesNo": {
254
- "enum": ["No"]
255
- },
256
- "details": {
257
- "title": "Details",
258
- "type": "string",
259
- "minLength": 1
260
- }
261
- },
262
- "required": ["details"]
250
+ "details": {
251
+ "title": "Details",
252
+ "type": "string",
253
+ "minLength": 1
263
254
  }
264
- ]
255
+ },
256
+ "required": ["details"]
265
257
  }
266
- }
258
+ ]
267
259
  }
268
260
  }
269
261
  }
@@ -773,33 +773,29 @@
773
773
  }
774
774
  },
775
775
  "required": ["yesNo"],
776
- "dependencies": {
777
- "yesNo": {
778
- "oneOf": [
779
- {
780
- "properties": {
781
- "yesNo": {
782
- "enum": ["No"]
783
- }
784
- },
785
- "additionalProperties": false
776
+ "discriminator": { "propertyName": "yesNo" },
777
+ "oneOf": [
778
+ {
779
+ "properties": {
780
+ "yesNo": {
781
+ "enum": ["No"]
782
+ }
783
+ }
784
+ },
785
+ {
786
+ "properties": {
787
+ "yesNo": {
788
+ "enum": ["Yes"]
786
789
  },
787
- {
788
- "properties": {
789
- "yesNo": {
790
- "enum": ["Yes"]
791
- },
792
- "details": {
793
- "title": "Details",
794
- "type": "string",
795
- "minLength": 1
796
- }
797
- },
798
- "required": ["details"]
790
+ "details": {
791
+ "title": "Details",
792
+ "type": "string",
793
+ "minLength": 1
799
794
  }
800
- ]
795
+ },
796
+ "required": ["details"]
801
797
  }
802
- }
798
+ ]
803
799
  },
804
800
  "planningApplicationList": {
805
801
  "type": "array",
@@ -39,173 +39,167 @@
39
39
  }
40
40
  },
41
41
  "required": ["displayName", "status"],
42
- "dependencies": {
43
- "status": {
44
- "oneOf": [
45
- {
46
- "properties": {
47
- "status": {
48
- "enum": ["Ordered"]
49
- },
50
- "orderDate": {
51
- "title": "Date search was ordered",
52
- "type": "string",
53
- "format": "date-time"
54
- },
55
- "expectedDeliveryDate": {
56
- "title": "Date search provider indicates to expect delivery",
57
- "type": "string",
58
- "format": "date-time"
59
- },
60
- "searchContentTypes": {
61
- "type": "array",
62
- "items": {
42
+ "discriminator": { "propertyName": "status" },
43
+ "oneOf": [
44
+ {
45
+ "properties": {
46
+ "status": {
47
+ "enum": ["Ordered"]
48
+ },
49
+ "orderDate": {
50
+ "title": "Date search was ordered",
51
+ "type": "string",
52
+ "format": "date-time"
53
+ },
54
+ "expectedDeliveryDate": {
55
+ "title": "Date search provider indicates to expect delivery",
56
+ "type": "string",
57
+ "format": "date-time"
58
+ },
59
+ "searchContentTypes": {
60
+ "type": "array",
61
+ "items": {
62
+ "$ref": "#/$defs/contentTypes"
63
+ }
64
+ }
65
+ },
66
+ "required": ["providerName", "orderDate"]
67
+ },
68
+ {
69
+ "properties": {
70
+ "status": {
71
+ "enum": ["Delivered"]
72
+ },
73
+ "reportDate": {
74
+ "title": "Report date",
75
+ "type": "string",
76
+ "format": "date-time"
77
+ },
78
+ "summary": {
79
+ "title": "Summary of report",
80
+ "type": "string",
81
+ "minLength": 1
82
+ },
83
+ "recommendations": {
84
+ "title": "Report recommendations",
85
+ "type": "string",
86
+ "minLength": 1
87
+ },
88
+ "actionAlertRating": {
89
+ "title": "Action alert rating (1 is Green, 5 is Red)",
90
+ "type": "string",
91
+ "enum": ["1", "2", "3", "4", "5"]
92
+ },
93
+ "complianceStatement": {
94
+ "title": "Statement of methodology and compliance with reporting standards",
95
+ "type": "string",
96
+ "minLength": 1
97
+ },
98
+ "results": {
99
+ "type": "array",
100
+ "items": {
101
+ "type": "object",
102
+ "properties": {
103
+ "contentType": {
63
104
  "$ref": "#/$defs/contentTypes"
64
105
  }
65
- }
66
- },
67
- "required": ["providerName", "orderDate"]
68
- },
69
- {
70
- "properties": {
71
- "status": {
72
- "enum": ["Delivered"]
73
- },
74
- "reportDate": {
75
- "title": "Report date",
76
- "type": "string",
77
- "format": "date-time"
78
- },
79
- "summary": {
80
- "title": "Summary of report",
81
- "type": "string",
82
- "minLength": 1
83
- },
84
- "recommendations": {
85
- "title": "Report recommendations",
86
- "type": "string",
87
- "minLength": 1
88
106
  },
89
- "actionAlertRating": {
90
- "title": "Action alert rating (1 is Green, 5 is Red)",
91
- "type": "string",
92
- "enum": ["1", "2", "3", "4", "5"]
93
- },
94
- "complianceStatement": {
95
- "title": "Statement of methodology and compliance with reporting standards",
96
- "type": "string",
97
- "minLength": 1
98
- },
99
- "results": {
100
- "type": "array",
101
- "items": {
102
- "type": "object",
107
+ "required": ["contentType"],
108
+ "discriminator": { "propertyName": "contentType" },
109
+ "oneOf": [
110
+ {
111
+ "properties": {
112
+ "contentType": {
113
+ "enum": ["Local Land Charges"]
114
+ },
115
+ "localLandCharges": {
116
+ "$ref": "https://trust.propdata.org.uk/schemas/v1/searches/local-land-charges.json"
117
+ }
118
+ },
119
+ "required": ["localLandCharges"]
120
+ },
121
+ {
122
+ "properties": {
123
+ "contentType": {
124
+ "enum": ["Required Local Searches"]
125
+ },
126
+ "requiredLocalSearches": {
127
+ "$ref": "https://trust.propdata.org.uk/schemas/v1/searches/local-searches-required.json"
128
+ }
129
+ },
130
+ "required": ["requiredLocalSearches"]
131
+ },
132
+ {
103
133
  "properties": {
104
134
  "contentType": {
105
- "$ref": "#/$defs/contentTypes"
135
+ "enum": ["Drainage and Water Searches"]
136
+ },
137
+ "drainageAndWater": {
138
+ "$ref": "https://trust.propdata.org.uk/schemas/v1/searches/drainage-and-water.json"
106
139
  }
107
140
  },
108
- "required": ["contentType"],
109
- "dependencies": {
141
+ "required": ["con29DW"]
142
+ },
143
+ {
144
+ "properties": {
110
145
  "contentType": {
111
- "oneOf": [
112
- {
113
- "properties": {
114
- "contentType": {
115
- "enum": ["Local Land Charges"]
116
- },
117
- "localLandCharges": {
118
- "$ref": "https://trust.propdata.org.uk/schemas/v1/searches/local-land-charges.json"
119
- }
120
- },
121
- "required": ["localLandCharges"]
122
- },
123
- {
124
- "properties": {
125
- "contentType": {
126
- "enum": ["Required Local Searches"]
127
- },
128
- "requiredLocalSearches": {
129
- "$ref": "https://trust.propdata.org.uk/schemas/v1/searches/local-searches-required.json"
130
- }
131
- },
132
- "required": ["requiredLocalSearches"]
133
- },
134
- {
135
- "properties": {
136
- "contentType": {
137
- "enum": ["Drainage and Water Searches"]
138
- },
139
- "drainageAndWater": {
140
- "$ref": "https://trust.propdata.org.uk/schemas/v1/searches/drainage-and-water.json"
141
- }
142
- },
143
- "required": ["con29DW"]
144
- },
145
- {
146
- "properties": {
147
- "contentType": {
148
- "enum": [
149
- "Flood",
150
- "Contaminated Land",
151
- "Coal",
152
- "Bath Stone",
153
- "Metalliferous (Tin)",
154
- "Kaolin & Ball Clay",
155
- "Limestone",
156
- "Brine",
157
- "HS2",
158
- "Crossrail",
159
- "Energy Exploration",
160
- "Wind Farms",
161
- "Renewable Power Plants",
162
- "Solar Farms",
163
- "London Underground",
164
- "Ground Stability",
165
- "Non Coal Mining",
166
- "Ground Movement",
167
- "Mineral",
168
- "Radon",
169
- "Other"
170
- ]
171
- },
172
- "recommendedActionIndicator": {
173
- "title": "Recommended action indicator",
174
- "type": "string",
175
- "enum": ["Yes", "No"]
176
- },
177
- "actionAlertRating": {
178
- "title": "Action alert rating (1 is Green, 5 is Red)",
179
- "type": "string",
180
- "enum": ["1", "2", "3", "4", "5"]
181
- },
182
- "summary": {
183
- "title": "Summary of report",
184
- "type": "string",
185
- "minLength": 1
186
- },
187
- "recommendations": {
188
- "title": "Report recommendations",
189
- "type": "string",
190
- "minLength": 1
191
- },
192
- "complianceStatement": {
193
- "title": "Statement of methodology and compliance with reporting standards",
194
- "type": "string",
195
- "minLength": 1
196
- }
197
- }
198
- }
146
+ "enum": [
147
+ "Flood",
148
+ "Contaminated Land",
149
+ "Coal",
150
+ "Bath Stone",
151
+ "Metalliferous (Tin)",
152
+ "Kaolin & Ball Clay",
153
+ "Limestone",
154
+ "Brine",
155
+ "HS2",
156
+ "Crossrail",
157
+ "Energy Exploration",
158
+ "Wind Farms",
159
+ "Renewable Power Plants",
160
+ "Solar Farms",
161
+ "London Underground",
162
+ "Ground Stability",
163
+ "Non Coal Mining",
164
+ "Ground Movement",
165
+ "Mineral",
166
+ "Radon",
167
+ "Other"
199
168
  ]
169
+ },
170
+ "recommendedActionIndicator": {
171
+ "title": "Recommended action indicator",
172
+ "type": "string",
173
+ "enum": ["Yes", "No"]
174
+ },
175
+ "actionAlertRating": {
176
+ "title": "Action alert rating (1 is Green, 5 is Red)",
177
+ "type": "string",
178
+ "enum": ["1", "2", "3", "4", "5"]
179
+ },
180
+ "summary": {
181
+ "title": "Summary of report",
182
+ "type": "string",
183
+ "minLength": 1
184
+ },
185
+ "recommendations": {
186
+ "title": "Report recommendations",
187
+ "type": "string",
188
+ "minLength": 1
189
+ },
190
+ "complianceStatement": {
191
+ "title": "Statement of methodology and compliance with reporting standards",
192
+ "type": "string",
193
+ "minLength": 1
200
194
  }
201
195
  }
202
196
  }
203
- }
197
+ ]
204
198
  }
205
199
  }
206
- ]
200
+ }
207
201
  }
208
- }
202
+ ]
209
203
  },
210
204
  "$defs": {
211
205
  "contentTypes": {
@@ -9,6 +9,7 @@ const exampleDocumentedVouch = require("../examples/exampleDocumentedVouch.json"
9
9
  const ajv = new Ajv({
10
10
  allErrors: true,
11
11
  strictSchema: false,
12
+ discriminator: true,
12
13
  });
13
14
  addFormats(ajv);
14
15