@pdtf/schemas 0.5.12 → 0.5.15
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.
- package/index.js +16 -10
- package/package.json +1 -1
- package/src/examples/exampleElectronicRecord.json +2 -2
- package/src/examples/examplePropertyPack.json +304 -10
- package/src/schemas/energy-performance-certificate.json +3 -0
- package/src/schemas/pdtf-verified-claims.json +28 -28
- package/src/schemas/property-pack.json +0 -34
- package/src/schemas/title-deed.json +168 -105
- package/src/tests/pdtfVerifiedClaims.test.js +2 -5
- package/src/tests/propertyPackSchema.test.js +34 -3
- package/src/schemas/pdtf-claim.json +0 -27
package/index.js
CHANGED
|
@@ -8,8 +8,7 @@ const baspiLegalInformation = require("./src/schemas/baspi-b-legal-information.j
|
|
|
8
8
|
const energyPerformanceCertificate = require("./src/schemas/energy-performance-certificate.json");
|
|
9
9
|
const titleDeed = require("./src/schemas/title-deed.json");
|
|
10
10
|
const geoJson = require("./src/schemas/GeoJSON.json");
|
|
11
|
-
const
|
|
12
|
-
const verifiedClaim = require("./src/schemas/verified_claims-12.json");
|
|
11
|
+
const verifiedClaimsSchema = require("./src/schemas/pdtf-verified-claims.json");
|
|
13
12
|
|
|
14
13
|
const subSchemas = {
|
|
15
14
|
"https://homebuyingandsellinggroup.co.uk/schemas/baspi-a-material-facts.json":
|
|
@@ -19,7 +18,7 @@ const subSchemas = {
|
|
|
19
18
|
"https://homebuyingandsellinggroup.co.uk/schemas/energy-performance-certificate.json":
|
|
20
19
|
energyPerformanceCertificate,
|
|
21
20
|
"https://geojson.org/schema/GeoJSON.json": geoJson,
|
|
22
|
-
"https://homebuyingandsellinggroup.co.uk/schemas/title-deed.json": titleDeed
|
|
21
|
+
"https://homebuyingandsellinggroup.co.uk/schemas/title-deed.json": titleDeed,
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
const propertyPackSchema = dereference(propertyPack, (id) => subSchemas[id]);
|
|
@@ -27,7 +26,7 @@ const propertyPackSchema = dereference(propertyPack, (id) => subSchemas[id]);
|
|
|
27
26
|
const ajv = new Ajv({
|
|
28
27
|
allErrors: true,
|
|
29
28
|
// schema contains additional baspiRef and RDSRef metadata which is not strictly valid
|
|
30
|
-
strictSchema: false
|
|
29
|
+
strictSchema: false,
|
|
31
30
|
});
|
|
32
31
|
// Adds date formats among other types to the validator.
|
|
33
32
|
addFormats(ajv);
|
|
@@ -37,15 +36,23 @@ const validator = ajv.compile(propertyPackSchema);
|
|
|
37
36
|
const getSubschema = (path) => {
|
|
38
37
|
const pathArray = path.split("/").slice(1);
|
|
39
38
|
if (pathArray.length < 1) {
|
|
40
|
-
return
|
|
39
|
+
return propertyPackSchema;
|
|
41
40
|
}
|
|
42
|
-
return pathArray.reduce((
|
|
43
|
-
return
|
|
41
|
+
return pathArray.reduce((schema, pathElement) => {
|
|
42
|
+
if (schema.type === "array") return schema.items;
|
|
43
|
+
return schema.properties[pathElement];
|
|
44
44
|
}, propertyPackSchema);
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
const getSubschemaValidator = (path) => {
|
|
48
|
-
|
|
48
|
+
const subSchema = getSubschema(path);
|
|
49
|
+
let validator = ajv.getSchema(path);
|
|
50
|
+
if (!validator && subSchema.$id) validator = ajv.getSchema(subSchema.$id);
|
|
51
|
+
if (!validator) {
|
|
52
|
+
ajv.addSchema(subSchema, path);
|
|
53
|
+
validator = ajv.getSchema(path);
|
|
54
|
+
}
|
|
55
|
+
return validator;
|
|
49
56
|
};
|
|
50
57
|
|
|
51
58
|
const getTitleAtPath = (schema, path, rootPath = path) => {
|
|
@@ -98,6 +105,5 @@ module.exports = {
|
|
|
98
105
|
getSubschema,
|
|
99
106
|
getSubschemaValidator,
|
|
100
107
|
getTitleAtPath,
|
|
101
|
-
|
|
102
|
-
verifiedClaim
|
|
108
|
+
verifiedClaimsSchema,
|
|
103
109
|
};
|
package/package.json
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"source": {
|
|
10
10
|
"name": "Royal Mail Postcode Address File record via ideal-postcodes.co.uk"
|
|
11
11
|
},
|
|
12
|
-
"type": "
|
|
12
|
+
"type": "postcode_address_file"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"claims": {
|
|
18
|
-
"/propertyPack/materialFacts/
|
|
18
|
+
"/propertyPack/materialFacts/address": {
|
|
19
19
|
"address1": "3 The Hollys",
|
|
20
20
|
"address2": "Birtley",
|
|
21
21
|
"town": "CHESTER LE STREET",
|
|
@@ -5,29 +5,27 @@
|
|
|
5
5
|
"sellers": {
|
|
6
6
|
"sellerInformation": [
|
|
7
7
|
{
|
|
8
|
-
"name": { "firstName": "
|
|
8
|
+
"name": { "firstName": "Peter", "lastName": "Hetherington-Smythe" },
|
|
9
9
|
"dateOfBirth": "1975-12-25",
|
|
10
10
|
"mobileNumber": "07777 222333",
|
|
11
11
|
"email": "john@theseller.com",
|
|
12
|
-
"address": { "address1": "
|
|
12
|
+
"address": { "address1": "47 Park Road", "postcode": "AL3 5AF" }
|
|
13
13
|
}
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
16
|
"materialFacts": {
|
|
17
17
|
"address": {
|
|
18
|
-
"address1": "
|
|
18
|
+
"address1": "47 Park Road",
|
|
19
19
|
"address2": "",
|
|
20
|
-
"town": "
|
|
21
|
-
"county": "
|
|
22
|
-
"postcode": "
|
|
20
|
+
"town": "HARPENDEN",
|
|
21
|
+
"county": "Herts",
|
|
22
|
+
"postcode": "AL3 5AF"
|
|
23
23
|
},
|
|
24
24
|
"energyEfficiency": {
|
|
25
25
|
"energyEfficiencyRating": "A"
|
|
26
26
|
},
|
|
27
27
|
"delayFactors": {
|
|
28
|
-
"hasDelayFactors": {
|
|
29
|
-
"yesNo": "No"
|
|
30
|
-
}
|
|
28
|
+
"hasDelayFactors": { "yesNo": "No" }
|
|
31
29
|
},
|
|
32
30
|
"ownership": {
|
|
33
31
|
"ownershipType": "Freehold"
|
|
@@ -371,6 +369,302 @@
|
|
|
371
369
|
"consumerProtectionRegulationsDeclaration": {
|
|
372
370
|
"consumerProtectionRegulationsResponse": true
|
|
373
371
|
}
|
|
374
|
-
}
|
|
372
|
+
},
|
|
373
|
+
"energyPerformanceCertificate": {
|
|
374
|
+
"certificate": { "currentEnergyRating": "B" }
|
|
375
|
+
},
|
|
376
|
+
"titlesToBeSold": [
|
|
377
|
+
{
|
|
378
|
+
"titleNumber": "HD221222",
|
|
379
|
+
"titleExtents": [
|
|
380
|
+
{
|
|
381
|
+
"type": "Feature",
|
|
382
|
+
"properties": {
|
|
383
|
+
"POLY_ID": 19851403,
|
|
384
|
+
"TITLE_NO": "HD221222",
|
|
385
|
+
"INSERT": "2016-02-05T13:36:55",
|
|
386
|
+
"UPDATE": "2016-02-05T13:36:55",
|
|
387
|
+
"REC_STATUS": "A"
|
|
388
|
+
},
|
|
389
|
+
"geometry": {
|
|
390
|
+
"type": "Polygon",
|
|
391
|
+
"coordinates": [
|
|
392
|
+
[
|
|
393
|
+
[-2.578781821932439, 51.48576411094672],
|
|
394
|
+
[-2.578669662492341, 51.48572105544199],
|
|
395
|
+
[-2.5786421470447154, 51.48570905261714],
|
|
396
|
+
[-2.5785524174118404, 51.48567442829361],
|
|
397
|
+
[-2.5785328794340825, 51.48566688186638],
|
|
398
|
+
[-2.5785279074169107, 51.4856723013566],
|
|
399
|
+
[-2.5784923376884157, 51.48570664492474],
|
|
400
|
+
[-2.5785118756765826, 51.48571419135863],
|
|
401
|
+
[-2.578603776881019, 51.48574970415372],
|
|
402
|
+
[-2.578629846557485, 51.48576126454427],
|
|
403
|
+
[-2.578738400129546, 51.48580388830907],
|
|
404
|
+
[-2.578781821932439, 51.48576411094672]
|
|
405
|
+
]
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
],
|
|
410
|
+
"registerExtract": {
|
|
411
|
+
"OCSummaryData": {
|
|
412
|
+
"Title": {
|
|
413
|
+
"TitleNumber": "HD221222",
|
|
414
|
+
"ClassOfTitleCode": "10",
|
|
415
|
+
"TitleRegistrationDetails": {
|
|
416
|
+
"LatestEditionDate": "2020-11-24",
|
|
417
|
+
"RegistrationDate": "1991-11-11",
|
|
418
|
+
"DistrictName": "ST ALBANS",
|
|
419
|
+
"PostcodeZone": {
|
|
420
|
+
"Postcode": "AL3 5AF"
|
|
421
|
+
},
|
|
422
|
+
"LandRegistryOfficeName": "Leicester Office",
|
|
423
|
+
"AdministrativeArea": "HERTFORDSHIRE"
|
|
424
|
+
},
|
|
425
|
+
"CommonholdIndicator": "false"
|
|
426
|
+
},
|
|
427
|
+
"OfficialCopyDateTime": "2021-12-16T08:39:52",
|
|
428
|
+
"PropertyAddress": {
|
|
429
|
+
"PostcodeZone": {
|
|
430
|
+
"Postcode": "AL3 5AF"
|
|
431
|
+
},
|
|
432
|
+
"AddressLine": {
|
|
433
|
+
"Line": ["47 Park Road", "Harpenden"]
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
"Proprietorship": {
|
|
437
|
+
"RegisteredProprietorParty": [
|
|
438
|
+
{
|
|
439
|
+
"PrivateIndividual": {
|
|
440
|
+
"Name": {
|
|
441
|
+
"SurnameName": "Hetherington-Smythe",
|
|
442
|
+
"ForenamesName": "Peter Ronald"
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
"Address": {
|
|
446
|
+
"PostcodeZone": {
|
|
447
|
+
"Postcode": "AL3 5AF"
|
|
448
|
+
},
|
|
449
|
+
"AddressLine": {
|
|
450
|
+
"Line": ["47 Park Road", "Harpenden"]
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
"Address": {
|
|
456
|
+
"AddressLine": {
|
|
457
|
+
"Line": ["47 Park Road", "Harpenden"]
|
|
458
|
+
},
|
|
459
|
+
"PostcodeZone": {
|
|
460
|
+
"Postcode": "AL3 5AF"
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"PrivateIndividual": {
|
|
464
|
+
"Name": {
|
|
465
|
+
"ForenamesName": "Clarissa Jane",
|
|
466
|
+
"SurnameName": "Hetherington-Smythe"
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
"CurrentProprietorshipDate": "2020-11-24"
|
|
472
|
+
},
|
|
473
|
+
"EditionDate": "2020-11-24",
|
|
474
|
+
"DocumentDetails": {
|
|
475
|
+
"Document": {
|
|
476
|
+
"EntryNumber": ["B3", "C2", "C3", "C4"],
|
|
477
|
+
"PlanOnlyIndicator": "false",
|
|
478
|
+
"RegisterDescription": "Charge",
|
|
479
|
+
"DocumentType": "50",
|
|
480
|
+
"DocumentDate": "2020-11-03"
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"RestrictionDetails": {
|
|
484
|
+
"RestrictionEntry": {
|
|
485
|
+
"ChargeRestriction": {
|
|
486
|
+
"ChargeID": "1",
|
|
487
|
+
"EntryDetails": {
|
|
488
|
+
"EntryNumber": "3",
|
|
489
|
+
"Infills": {
|
|
490
|
+
"ChargeDate": "2020-11-03",
|
|
491
|
+
"ChargeParty": "Barclays Bank UK PLC"
|
|
492
|
+
},
|
|
493
|
+
"SubRegisterCode": "B",
|
|
494
|
+
"EntryText": "RESTRICTION: No disposition of the registered estate by the proprietor of the registered estate is to be registered without a written consent signed by the proprietor for the time being of the Charge dated 3 November 2020 in favour of Barclays Bank UK PLC referred to in the Charges Register."
|
|
495
|
+
},
|
|
496
|
+
"RestrictionTypeCode": "30"
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
"PricePaidEntry": {
|
|
501
|
+
"EntryDetails": {
|
|
502
|
+
"EntryText": "The price stated to have been paid on 3 November 2020 was £1,100,000.",
|
|
503
|
+
"SubRegisterCode": "B",
|
|
504
|
+
"EntryNumber": "2",
|
|
505
|
+
"Infills": {
|
|
506
|
+
"Date": "2020-11-03",
|
|
507
|
+
"Amount": "£1,260,000"
|
|
508
|
+
},
|
|
509
|
+
"RegistrationDate": "2020-11-24"
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
"Charge": {
|
|
513
|
+
"ChargeEntry": {
|
|
514
|
+
"RegisteredCharge": {
|
|
515
|
+
"EntryDetails": {
|
|
516
|
+
"SubRegisterCode": "C",
|
|
517
|
+
"RegistrationDate": "2020-11-24",
|
|
518
|
+
"EntryText": "REGISTERED CHARGE dated 3 November 2020.",
|
|
519
|
+
"Infills": {
|
|
520
|
+
"ChargeDate": "2020-11-03"
|
|
521
|
+
},
|
|
522
|
+
"EntryNumber": "2"
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
"ChargeDate": "2020-11-03",
|
|
526
|
+
"ChargeID": "1",
|
|
527
|
+
"ChargeProprietor": {
|
|
528
|
+
"ChargeeParty": {
|
|
529
|
+
"Organization": {
|
|
530
|
+
"Name": "Barclays Bank UK PLC"
|
|
531
|
+
},
|
|
532
|
+
"Address": {
|
|
533
|
+
"AddressLine": {
|
|
534
|
+
"Line": ["P.O. Box 187", "Leeds"]
|
|
535
|
+
},
|
|
536
|
+
"PostcodeZone": {
|
|
537
|
+
"Postcode": "LS11 1AN"
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"EntryDetails": {
|
|
542
|
+
"SubRegisterCode": "C",
|
|
543
|
+
"RegistrationDate": "2020-11-24",
|
|
544
|
+
"EntryNumber": "3",
|
|
545
|
+
"EntryText": "Proprietor: BARCLAYS BANK UK PLC (Co. Regn. No. 9740322) of P.O. Box 187, Leeds LS11 1AN."
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"RegisterEntryIndicators": {
|
|
551
|
+
"UnidentifiedEntryIndicator": "false",
|
|
552
|
+
"SubChargeIndicator": "false",
|
|
553
|
+
"DiscountChargeIndicator": "false",
|
|
554
|
+
"ChargeIndicator": "true",
|
|
555
|
+
"PropertyDescriptionNotesIndicator": "false",
|
|
556
|
+
"ChargeRelatedRestrictionIndicator": "false",
|
|
557
|
+
"BankruptcyIndicator": "false",
|
|
558
|
+
"MultipleChargeIndicator": "false",
|
|
559
|
+
"HomeRightsChangeOfAddressIndicator": "false",
|
|
560
|
+
"CCBIIndicator": "false",
|
|
561
|
+
"AgreedNoticeIndicator": "false",
|
|
562
|
+
"VendorsLienIndicator": "false",
|
|
563
|
+
"RightOfPreEmptionIndicator": "false",
|
|
564
|
+
"CreditorsNoticeIndicator": "false",
|
|
565
|
+
"CautionIndicator": "false",
|
|
566
|
+
"ChargeRestrictionIndicator": "true",
|
|
567
|
+
"ScheduleOfLeasesIndicator": "false",
|
|
568
|
+
"UnilateralNoticeIndicator": "false",
|
|
569
|
+
"DeathOfProprietorIndicator": "false",
|
|
570
|
+
"RentChargeIndicator": "false",
|
|
571
|
+
"EquitableChargeIndicator": "false",
|
|
572
|
+
"ChargeeIndicator": "true",
|
|
573
|
+
"DeedOfPostponementIndicator": "false",
|
|
574
|
+
"NonChargeRestrictionIndicator": "false",
|
|
575
|
+
"GreenOutEntryIndicator": "false",
|
|
576
|
+
"UnilateralNoticeBeneficiaryIndicator": "false",
|
|
577
|
+
"NotedChargeIndicator": "false",
|
|
578
|
+
"PricePaidIndicator": "true",
|
|
579
|
+
"HomeRightsIndicator": "false",
|
|
580
|
+
"LeaseHoldTitleIndicator": "false"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
"OCRegisterData": {
|
|
584
|
+
"ChargesRegister": {
|
|
585
|
+
"RegisterEntry": [
|
|
586
|
+
{
|
|
587
|
+
"EntryNumber": "1",
|
|
588
|
+
"EntryType": "Restrictive Covenants/Stipulations - Deed",
|
|
589
|
+
"EntryText": [
|
|
590
|
+
"A Conveyance of the land in this title dated 7 June 1946 made between (1) Jesse Catton (Vendor) and (2) Henry Dick Goodman Cunnold (Purchaser) contains the following covenants:-",
|
|
591
|
+
"\"THE Purchaser for himself his successors in title and assigns and to the intent that this covenant will run with the land but not so that the Purchaser is liable after he has parted with the same hereby covenants with the Vendor and his successors in title that he the Purchaser and his successors in title will observe and perform the covenants contained in the Schedule hereto.",
|
|
592
|
+
"THE SCHEDULE before referred to",
|
|
593
|
+
"(1) For ever to maintain a proper fence on the side of the boundary of the land marked !\"T\" within the boundary on the said plan.",
|
|
594
|
+
"(2) To observe a building line of fifteen feet from the boundary of the land fronting Park Road",
|
|
595
|
+
"(3) That the house or any buildings erected on the said land shall not at any time be used for the purpose of any trade manufacture or business of any description or as an asylum hospital or other institution but are to be used only as a private dwellinghouse or professional residence of a Physician Surgeon or Solicitor.",
|
|
596
|
+
"(4) That only one such dwellinghouse shall be on the said piece of land.\"",
|
|
597
|
+
"NOTE: The North Eastern boundary of the land in this title is marked \"T\""
|
|
598
|
+
],
|
|
599
|
+
"EntryDate": "1991-11-11"
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"EntryText": "REGISTERED CHARGE dated 3 November 2020.",
|
|
603
|
+
"EntryType": "Registered Charges",
|
|
604
|
+
"EntryDate": "2020-11-24",
|
|
605
|
+
"EntryNumber": "2"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
"EntryNumber": "3",
|
|
609
|
+
"EntryDate": "2020-11-24",
|
|
610
|
+
"EntryType": "Chargee",
|
|
611
|
+
"EntryText": "Proprietor: BARCLAYS BANK UK PLC (Co. Regn. No. 9740322) of P.O. Box 187, Leeds LS11 1AN."
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
"EntryType": "Obligation",
|
|
615
|
+
"EntryDate": "2020-11-24",
|
|
616
|
+
"EntryNumber": "4",
|
|
617
|
+
"EntryText": "The proprietor of the Charge dated 3 November 2020 referred to above is under an obligation to make further advances. These advances will have priority to the extent afforded by section 49(3) Land Registration Act 2002."
|
|
618
|
+
}
|
|
619
|
+
]
|
|
620
|
+
},
|
|
621
|
+
"PropertyRegister": {
|
|
622
|
+
"DistrictDetails": {
|
|
623
|
+
"EntryText": "HERTFORDSHIRE : ST ALBANS"
|
|
624
|
+
},
|
|
625
|
+
"RegisterEntry": [
|
|
626
|
+
{
|
|
627
|
+
"EntryType": "Property Description",
|
|
628
|
+
"EntryNumber": "1",
|
|
629
|
+
"EntryText": "The Freehold land shown edged with red on the plan of the above Title filed at the Registry and being 47 Park Road, Harpenden (AL3 5AF).",
|
|
630
|
+
"EntryDate": "1991-11-11"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"EntryNumber": "2",
|
|
634
|
+
"EntryText": [
|
|
635
|
+
"The Conveyance dated 7 June 1946 referred to in the Charges Register contains the following provision:-",
|
|
636
|
+
"\"IT IS hereby declared that the Purchaser shall not be entitled to any right of light or air which will restrict the free use of the adjoining property of the Vendor for building or other purpose.\""
|
|
637
|
+
],
|
|
638
|
+
"EntryDate": "1991-11-11",
|
|
639
|
+
"EntryType": "Provisions"
|
|
640
|
+
}
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
"ProprietorshipRegister": {
|
|
644
|
+
"RegisterEntry": [
|
|
645
|
+
{
|
|
646
|
+
"EntryDate": "2020-11-24",
|
|
647
|
+
"EntryText": "PROPRIETOR: PETER RONALD HETHERINGTON-SMYTH and CLARISSA JANE HETHERINGTON-SMYTH of 47 Park Mount, Harpenden AL3 5AF.",
|
|
648
|
+
"EntryType": "Proprietor",
|
|
649
|
+
"EntryNumber": "1"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"EntryText": "The price stated to have been paid on 3 November 2020 was £1,260,000.",
|
|
653
|
+
"EntryType": "Price Paid",
|
|
654
|
+
"EntryDate": "2020-11-24",
|
|
655
|
+
"EntryNumber": "2"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"EntryNumber": "3",
|
|
659
|
+
"EntryDate": "2020-11-24",
|
|
660
|
+
"EntryType": "Charge Restriction - B Register",
|
|
661
|
+
"EntryText": "RESTRICTION: No disposition of the registered estate by the proprietor of the registered estate is to be registered without a written consent signed by the proprietor for the time being of the Charge dated 3 November 2020 in favour of Barclays Bank UK PLC referred to in the Charges Register."
|
|
662
|
+
}
|
|
663
|
+
]
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
]
|
|
375
669
|
}
|
|
376
670
|
}
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
"type": "object",
|
|
5
5
|
"title": "Energy Performance Certificate and Recommendations Schema, supporting data retrieved from https://epc.opendatacommunities.org ",
|
|
6
6
|
"description": "Mirrors the Domestic EPC Glossary at https://epc.opendatacommunities.org/docs/guidance#glossary",
|
|
7
|
+
"required": ["certificate"],
|
|
7
8
|
"properties": {
|
|
8
9
|
"certificate": {
|
|
9
10
|
"type": "object",
|
|
11
|
+
"required": ["currentEnergyRating"],
|
|
10
12
|
"properties": {
|
|
13
|
+
"certificateNumber": { "type": "string" },
|
|
11
14
|
"address": { "type": "string" },
|
|
12
15
|
"address1": { "type": "string" },
|
|
13
16
|
"address2": { "type": "string" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://
|
|
4
|
-
"
|
|
3
|
+
"$id": "https://homebuyingandsellinggroup.co.uk/schemas/pdtf-verified-claims.json",
|
|
4
|
+
"definitions": {
|
|
5
5
|
"date_type": {
|
|
6
6
|
"type": "string",
|
|
7
7
|
"format": "date"
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"type": "string"
|
|
21
21
|
},
|
|
22
22
|
"document_number": {
|
|
23
|
-
"$ref": "
|
|
23
|
+
"$ref": "#/definitions/document_number"
|
|
24
24
|
},
|
|
25
25
|
"number": {
|
|
26
|
-
"$ref": "
|
|
26
|
+
"$ref": "#/definitions/document_number"
|
|
27
27
|
},
|
|
28
28
|
"personal_number": {
|
|
29
29
|
"type": "string"
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"type": "string"
|
|
33
33
|
},
|
|
34
34
|
"date_of_issuance": {
|
|
35
|
-
"$ref": "
|
|
35
|
+
"$ref": "#/definitions/date_type"
|
|
36
36
|
},
|
|
37
37
|
"date_of_expiry": {
|
|
38
|
-
"$ref": "
|
|
38
|
+
"$ref": "#/definitions/date_type"
|
|
39
39
|
},
|
|
40
40
|
"issuer": {
|
|
41
41
|
"type": "object",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"enum": ["document", "electronic_record", "vouch"]
|
|
96
96
|
},
|
|
97
97
|
"attachments": {
|
|
98
|
-
"$ref": "
|
|
98
|
+
"$ref": "#/definitions/attachments"
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
"required": ["type"],
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
"then": {
|
|
112
112
|
"properties": {
|
|
113
113
|
"validation_method": {
|
|
114
|
-
"$ref": "
|
|
114
|
+
"$ref": "#/definitions/validation_method"
|
|
115
115
|
},
|
|
116
116
|
"verification_method": {
|
|
117
|
-
"$ref": "
|
|
117
|
+
"$ref": "#/definitions/verification_method"
|
|
118
118
|
},
|
|
119
119
|
"verifier": {
|
|
120
120
|
"type": "object",
|
|
@@ -128,10 +128,10 @@
|
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
"time": {
|
|
131
|
-
"$ref": "
|
|
131
|
+
"$ref": "#/definitions/time_type"
|
|
132
132
|
},
|
|
133
133
|
"document_details": {
|
|
134
|
-
"$ref": "
|
|
134
|
+
"$ref": "#/definitions/document_details"
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
},
|
|
@@ -148,10 +148,10 @@
|
|
|
148
148
|
"then": {
|
|
149
149
|
"properties": {
|
|
150
150
|
"validation_method": {
|
|
151
|
-
"$ref": "
|
|
151
|
+
"$ref": "#/definitions/validation_method"
|
|
152
152
|
},
|
|
153
153
|
"verification_method": {
|
|
154
|
-
"$ref": "
|
|
154
|
+
"$ref": "#/definitions/verification_method"
|
|
155
155
|
},
|
|
156
156
|
"verifier": {
|
|
157
157
|
"type": "object",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
"time": {
|
|
168
|
-
"$ref": "
|
|
168
|
+
"$ref": "#/definitions/time_type"
|
|
169
169
|
},
|
|
170
170
|
"record": {
|
|
171
171
|
"type": "object",
|
|
@@ -177,10 +177,10 @@
|
|
|
177
177
|
"type": "string"
|
|
178
178
|
},
|
|
179
179
|
"created_at": {
|
|
180
|
-
"$ref": "
|
|
180
|
+
"$ref": "#/definitions/date_type"
|
|
181
181
|
},
|
|
182
182
|
"date_of_expiry": {
|
|
183
|
-
"$ref": "
|
|
183
|
+
"$ref": "#/definitions/date_type"
|
|
184
184
|
},
|
|
185
185
|
"source": {
|
|
186
186
|
"type": "object",
|
|
@@ -231,10 +231,10 @@
|
|
|
231
231
|
"then": {
|
|
232
232
|
"properties": {
|
|
233
233
|
"validation_method": {
|
|
234
|
-
"$ref": "
|
|
234
|
+
"$ref": "#/definitions/validation_method"
|
|
235
235
|
},
|
|
236
236
|
"verification_method": {
|
|
237
|
-
"$ref": "
|
|
237
|
+
"$ref": "#/definitions/verification_method"
|
|
238
238
|
},
|
|
239
239
|
"verifier": {
|
|
240
240
|
"type": "object",
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
}
|
|
249
249
|
},
|
|
250
250
|
"time": {
|
|
251
|
-
"$ref": "
|
|
251
|
+
"$ref": "#/definitions/time_type"
|
|
252
252
|
},
|
|
253
253
|
"attestation": {
|
|
254
254
|
"type": "object",
|
|
@@ -264,10 +264,10 @@
|
|
|
264
264
|
"type": "string"
|
|
265
265
|
},
|
|
266
266
|
"date_of_issuance": {
|
|
267
|
-
"$ref": "
|
|
267
|
+
"$ref": "#/definitions/date_type"
|
|
268
268
|
},
|
|
269
269
|
"date_of_expiry": {
|
|
270
|
-
"$ref": "
|
|
270
|
+
"$ref": "#/definitions/date_type"
|
|
271
271
|
},
|
|
272
272
|
"voucher": {
|
|
273
273
|
"type": "object",
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
"type": "string"
|
|
277
277
|
},
|
|
278
278
|
"birthdate": {
|
|
279
|
-
"$ref": "
|
|
279
|
+
"$ref": "#/definitions/date_type"
|
|
280
280
|
},
|
|
281
281
|
"formatted": {
|
|
282
282
|
"type": "string"
|
|
@@ -332,7 +332,7 @@
|
|
|
332
332
|
"type": "string"
|
|
333
333
|
},
|
|
334
334
|
"digest": {
|
|
335
|
-
"$ref": "
|
|
335
|
+
"$ref": "#/definitions/digest"
|
|
336
336
|
},
|
|
337
337
|
"url": {
|
|
338
338
|
"type": "string",
|
|
@@ -352,7 +352,7 @@
|
|
|
352
352
|
"type": "array",
|
|
353
353
|
"minItems": 1,
|
|
354
354
|
"items": {
|
|
355
|
-
"$ref": "
|
|
355
|
+
"$ref": "#/definitions/external_attachment"
|
|
356
356
|
}
|
|
357
357
|
},
|
|
358
358
|
"verified_claims_def": {
|
|
@@ -366,7 +366,7 @@
|
|
|
366
366
|
"const": "uk_pdtf"
|
|
367
367
|
},
|
|
368
368
|
"time": {
|
|
369
|
-
"$ref": "
|
|
369
|
+
"$ref": "#/definitions/time_type"
|
|
370
370
|
},
|
|
371
371
|
"evidence": {
|
|
372
372
|
"type": "array",
|
|
@@ -374,7 +374,7 @@
|
|
|
374
374
|
"items": {
|
|
375
375
|
"oneOf": [
|
|
376
376
|
{
|
|
377
|
-
"$ref": "
|
|
377
|
+
"$ref": "#/definitions/evidence"
|
|
378
378
|
}
|
|
379
379
|
]
|
|
380
380
|
}
|
|
@@ -402,12 +402,12 @@
|
|
|
402
402
|
"verified_claims": {
|
|
403
403
|
"anyOf": [
|
|
404
404
|
{
|
|
405
|
-
"$ref": "
|
|
405
|
+
"$ref": "#/definitions/verified_claims_def"
|
|
406
406
|
},
|
|
407
407
|
{
|
|
408
408
|
"type": "array",
|
|
409
409
|
"items": {
|
|
410
|
-
"$ref": "
|
|
410
|
+
"$ref": "#/definitions/verified_claims_def"
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
]
|
|
@@ -102,40 +102,6 @@
|
|
|
102
102
|
"title": "Title Number",
|
|
103
103
|
"type": "string"
|
|
104
104
|
},
|
|
105
|
-
"classTitleCode": {
|
|
106
|
-
"RDSRef": "",
|
|
107
|
-
"title": "Class of Title",
|
|
108
|
-
"type": "string",
|
|
109
|
-
"enum": [
|
|
110
|
-
"AF",
|
|
111
|
-
"QF",
|
|
112
|
-
"PF",
|
|
113
|
-
"AL",
|
|
114
|
-
"GL",
|
|
115
|
-
"QL",
|
|
116
|
-
"PL",
|
|
117
|
-
"SF",
|
|
118
|
-
"CF",
|
|
119
|
-
"SL",
|
|
120
|
-
"CL",
|
|
121
|
-
"AR",
|
|
122
|
-
"PR",
|
|
123
|
-
"QR",
|
|
124
|
-
"CN"
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
|
-
"estateInterestCode": {
|
|
128
|
-
"RDSRef": "",
|
|
129
|
-
"title": "Estate Interest",
|
|
130
|
-
"type": "string",
|
|
131
|
-
"enum": ["EL", "FA", "FC", "MA", "PG", "RC", "RP", "RT"]
|
|
132
|
-
},
|
|
133
|
-
"registeredStatus": {
|
|
134
|
-
"RDSRef": "",
|
|
135
|
-
"title": "Registered Status",
|
|
136
|
-
"type": "string",
|
|
137
|
-
"enum": ["", "Pending"]
|
|
138
|
-
},
|
|
139
105
|
"titleExtents": {
|
|
140
106
|
"RDSRef": "",
|
|
141
107
|
"title": "Title Extents",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://homebuyingandsellinggroup.co.uk/schemas/title-deed.json",
|
|
4
|
-
"title": "
|
|
4
|
+
"title": "HMLR Official Copy Register Extract",
|
|
5
5
|
"description": "A schema mirroring the V2_1 XML version of the HMLR Register Extract web service.",
|
|
6
6
|
"definitions": {
|
|
7
7
|
"BinaryObjectType": {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"130"
|
|
108
108
|
]
|
|
109
109
|
},
|
|
110
|
-
"Infills": { "
|
|
110
|
+
"Infills": { "type": "object" }
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
"Q1PricePaidEntryType": {
|
|
@@ -131,11 +131,6 @@
|
|
|
131
131
|
"AddressLineType": {
|
|
132
132
|
"type": "object",
|
|
133
133
|
"properties": {
|
|
134
|
-
"IndexNumeric": {
|
|
135
|
-
"type": "array",
|
|
136
|
-
"items": { "type": "number" },
|
|
137
|
-
"minItems": 0
|
|
138
|
-
},
|
|
139
134
|
"Line": {
|
|
140
135
|
"type": "array",
|
|
141
136
|
"items": { "type": "string" },
|
|
@@ -152,27 +147,22 @@
|
|
|
152
147
|
}
|
|
153
148
|
},
|
|
154
149
|
"ClassOfTitleCodeType": {
|
|
155
|
-
"type": "
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
"120",
|
|
172
|
-
"130"
|
|
173
|
-
]
|
|
174
|
-
}
|
|
175
|
-
}
|
|
150
|
+
"type": "string",
|
|
151
|
+
"enum": [
|
|
152
|
+
"10",
|
|
153
|
+
"20",
|
|
154
|
+
"30",
|
|
155
|
+
"40",
|
|
156
|
+
"50",
|
|
157
|
+
"60",
|
|
158
|
+
"70",
|
|
159
|
+
"80",
|
|
160
|
+
"90",
|
|
161
|
+
"100",
|
|
162
|
+
"110",
|
|
163
|
+
"120",
|
|
164
|
+
"130"
|
|
165
|
+
]
|
|
176
166
|
},
|
|
177
167
|
"IndicatorType": {
|
|
178
168
|
"type": "string",
|
|
@@ -198,11 +188,7 @@
|
|
|
198
188
|
"$ref": "#/definitions/LandRegistryOfficeNameTextType"
|
|
199
189
|
},
|
|
200
190
|
"LatestEditionDate": { "type": "string", "format": "date" },
|
|
201
|
-
"PostcodeZone": {
|
|
202
|
-
"type": "array",
|
|
203
|
-
"items": { "$ref": "#/definitions/Q1PostcodeZoneType" },
|
|
204
|
-
"minItems": 0
|
|
205
|
-
},
|
|
191
|
+
"PostcodeZone": { "$ref": "#/definitions/Q1PostcodeZoneType" },
|
|
206
192
|
"RegistrationDate": { "type": "string", "format": "date" }
|
|
207
193
|
}
|
|
208
194
|
},
|
|
@@ -316,9 +302,14 @@
|
|
|
316
302
|
"properties": {
|
|
317
303
|
"Name": { "$ref": "#/definitions/Q1NameType" },
|
|
318
304
|
"Alias": {
|
|
319
|
-
"
|
|
320
|
-
|
|
321
|
-
|
|
305
|
+
"oneOf": [
|
|
306
|
+
{
|
|
307
|
+
"type": "array",
|
|
308
|
+
"items": { "$ref": "#/definitions/Q1NameType" },
|
|
309
|
+
"minItems": 0
|
|
310
|
+
},
|
|
311
|
+
{ "$ref": "#/definitions/Q1NameType" }
|
|
312
|
+
]
|
|
322
313
|
}
|
|
323
314
|
}
|
|
324
315
|
},
|
|
@@ -345,31 +336,32 @@
|
|
|
345
336
|
"required": ["CharityName", "CharityType"],
|
|
346
337
|
"properties": {
|
|
347
338
|
"CharityName": {
|
|
348
|
-
"
|
|
349
|
-
|
|
350
|
-
|
|
339
|
+
"oneOf": [
|
|
340
|
+
{ "type": "array", "items": { "type": "string" }, "minItems": 1 },
|
|
341
|
+
{ "type": "string" }
|
|
342
|
+
]
|
|
351
343
|
},
|
|
352
344
|
"CharityAddress": {
|
|
353
|
-
"
|
|
354
|
-
|
|
355
|
-
|
|
345
|
+
"oneOf": [
|
|
346
|
+
{
|
|
347
|
+
"type": "array",
|
|
348
|
+
"items": { "$ref": "#/definitions/Q1AddressType" },
|
|
349
|
+
"minItems": 0
|
|
350
|
+
},
|
|
351
|
+
{ "$ref": "#/definitions/Q1AddressType" }
|
|
352
|
+
]
|
|
356
353
|
},
|
|
357
354
|
"CharityType": { "$ref": "#/definitions/CharityCodeType" }
|
|
358
355
|
}
|
|
359
356
|
},
|
|
360
357
|
"Q1PartyType": {
|
|
361
358
|
"type": "object",
|
|
362
|
-
"required": ["PrivateIndividual", "Organization"],
|
|
363
359
|
"properties": {
|
|
364
360
|
"PrivateIndividual": {
|
|
365
361
|
"$ref": "#/definitions/Q1PrivateIndividualType"
|
|
366
362
|
},
|
|
367
363
|
"Organization": { "$ref": "#/definitions/Q1OrganizationType" },
|
|
368
|
-
"Address": {
|
|
369
|
-
"type": "array",
|
|
370
|
-
"items": { "$ref": "#/definitions/Q1AddressType" },
|
|
371
|
-
"minItems": 0
|
|
372
|
-
},
|
|
364
|
+
"Address": { "$ref": "#/definitions/Q1AddressType" },
|
|
373
365
|
"CharityDetails": { "$ref": "#/definitions/Q1CharityDetailsType" },
|
|
374
366
|
"TradingName": { "type": "string" },
|
|
375
367
|
"PartyNumber": { "type": "string" },
|
|
@@ -378,18 +370,27 @@
|
|
|
378
370
|
},
|
|
379
371
|
"Q1ProprietorshipType": {
|
|
380
372
|
"type": "object",
|
|
381
|
-
"required": ["CautionerParty", "RegisteredProprietorParty"],
|
|
382
373
|
"properties": {
|
|
383
374
|
"CurrentProprietorshipDate": { "type": "string", "format": "date" },
|
|
384
375
|
"CautionerParty": {
|
|
385
|
-
"
|
|
386
|
-
|
|
387
|
-
|
|
376
|
+
"oneOf": [
|
|
377
|
+
{
|
|
378
|
+
"type": "array",
|
|
379
|
+
"items": { "$ref": "#/definitions/Q1PartyType" },
|
|
380
|
+
"minItems": 1
|
|
381
|
+
},
|
|
382
|
+
{ "$ref": "#/definitions/Q1PartyType" }
|
|
383
|
+
]
|
|
388
384
|
},
|
|
389
385
|
"RegisteredProprietorParty": {
|
|
390
|
-
"
|
|
391
|
-
|
|
392
|
-
|
|
386
|
+
"oneOf": [
|
|
387
|
+
{
|
|
388
|
+
"type": "array",
|
|
389
|
+
"items": { "$ref": "#/definitions/Q1PartyType" },
|
|
390
|
+
"minItems": 1
|
|
391
|
+
},
|
|
392
|
+
{ "$ref": "#/definitions/Q1PartyType" }
|
|
393
|
+
]
|
|
393
394
|
}
|
|
394
395
|
}
|
|
395
396
|
},
|
|
@@ -449,9 +450,14 @@
|
|
|
449
450
|
"required": ["RestrictionEntry"],
|
|
450
451
|
"properties": {
|
|
451
452
|
"RestrictionEntry": {
|
|
452
|
-
"
|
|
453
|
-
|
|
454
|
-
|
|
453
|
+
"oneOf": [
|
|
454
|
+
{
|
|
455
|
+
"type": "array",
|
|
456
|
+
"items": { "$ref": "#/definitions/Q1RestrictionEntryType" },
|
|
457
|
+
"minItems": 1
|
|
458
|
+
},
|
|
459
|
+
{ "$ref": "#/definitions/Q1RestrictionEntryType" }
|
|
460
|
+
]
|
|
455
461
|
}
|
|
456
462
|
}
|
|
457
463
|
},
|
|
@@ -468,9 +474,14 @@
|
|
|
468
474
|
"required": ["ChargeeParty", "EntryDetails"],
|
|
469
475
|
"properties": {
|
|
470
476
|
"ChargeeParty": {
|
|
471
|
-
"
|
|
472
|
-
|
|
473
|
-
|
|
477
|
+
"oneOf": [
|
|
478
|
+
{
|
|
479
|
+
"type": "array",
|
|
480
|
+
"items": { "$ref": "#/definitions/Q1PartyType" },
|
|
481
|
+
"minItems": 1
|
|
482
|
+
},
|
|
483
|
+
{ "$ref": "#/definitions/Q1PartyType" }
|
|
484
|
+
]
|
|
474
485
|
},
|
|
475
486
|
"EntryDetails": { "$ref": "#/definitions/Q1EntryDetailsType" }
|
|
476
487
|
}
|
|
@@ -493,9 +504,14 @@
|
|
|
493
504
|
"RegisteredCharge": { "$ref": "#/definitions/Q1ChargeType" },
|
|
494
505
|
"ChargeProprietor": { "$ref": "#/definitions/Q1ChargeProprietorType" },
|
|
495
506
|
"SubCharge": {
|
|
496
|
-
"
|
|
497
|
-
|
|
498
|
-
|
|
507
|
+
"oneOf": [
|
|
508
|
+
{
|
|
509
|
+
"type": "array",
|
|
510
|
+
"items": { "$ref": "#/definitions/Q1SubChargeDetailsType" },
|
|
511
|
+
"minItems": 0
|
|
512
|
+
},
|
|
513
|
+
{ "$ref": "#/definitions/Q1SubChargeDetailsType" }
|
|
514
|
+
]
|
|
499
515
|
}
|
|
500
516
|
}
|
|
501
517
|
},
|
|
@@ -504,9 +520,14 @@
|
|
|
504
520
|
"required": ["ChargeEntry"],
|
|
505
521
|
"properties": {
|
|
506
522
|
"ChargeEntry": {
|
|
507
|
-
"
|
|
508
|
-
|
|
509
|
-
|
|
523
|
+
"oneOf": [
|
|
524
|
+
{
|
|
525
|
+
"type": "array",
|
|
526
|
+
"items": { "$ref": "#/definitions/Q1ChargeDetailsType" },
|
|
527
|
+
"minItems": 1
|
|
528
|
+
},
|
|
529
|
+
{ "$ref": "#/definitions/Q1ChargeDetailsType" }
|
|
530
|
+
]
|
|
510
531
|
}
|
|
511
532
|
}
|
|
512
533
|
},
|
|
@@ -526,9 +547,14 @@
|
|
|
526
547
|
"required": ["AgreedNoticeEntry"],
|
|
527
548
|
"properties": {
|
|
528
549
|
"AgreedNoticeEntry": {
|
|
529
|
-
"
|
|
530
|
-
|
|
531
|
-
|
|
550
|
+
"oneOf": [
|
|
551
|
+
{
|
|
552
|
+
"type": "array",
|
|
553
|
+
"items": { "$ref": "#/definitions/Q1AgreedNoticeType" },
|
|
554
|
+
"minItems": 1
|
|
555
|
+
},
|
|
556
|
+
{ "$ref": "#/definitions/Q1AgreedNoticeType" }
|
|
557
|
+
]
|
|
532
558
|
}
|
|
533
559
|
}
|
|
534
560
|
},
|
|
@@ -537,9 +563,14 @@
|
|
|
537
563
|
"required": ["EntryDetails"],
|
|
538
564
|
"properties": {
|
|
539
565
|
"EntryDetails": {
|
|
540
|
-
"
|
|
541
|
-
|
|
542
|
-
|
|
566
|
+
"oneOf": [
|
|
567
|
+
{
|
|
568
|
+
"type": "array",
|
|
569
|
+
"items": { "$ref": "#/definitions/Q1EntryDetailsType" },
|
|
570
|
+
"minItems": 1
|
|
571
|
+
},
|
|
572
|
+
{ "$ref": "#/definitions/Q1EntryDetailsType" }
|
|
573
|
+
]
|
|
543
574
|
}
|
|
544
575
|
}
|
|
545
576
|
},
|
|
@@ -561,9 +592,14 @@
|
|
|
561
592
|
"required": ["HomeRightsEntry"],
|
|
562
593
|
"properties": {
|
|
563
594
|
"HomeRightsEntry": {
|
|
564
|
-
"
|
|
565
|
-
|
|
566
|
-
|
|
595
|
+
"oneOf": [
|
|
596
|
+
{
|
|
597
|
+
"type": "array",
|
|
598
|
+
"items": { "$ref": "#/definitions/Q1HomeRightsType" },
|
|
599
|
+
"minItems": 1
|
|
600
|
+
},
|
|
601
|
+
{ "$ref": "#/definitions/Q1HomeRightsType" }
|
|
602
|
+
]
|
|
567
603
|
}
|
|
568
604
|
}
|
|
569
605
|
},
|
|
@@ -601,9 +637,10 @@
|
|
|
601
637
|
},
|
|
602
638
|
"DocumentDate": { "type": "string" },
|
|
603
639
|
"EntryNumber": {
|
|
604
|
-
"
|
|
605
|
-
|
|
606
|
-
|
|
640
|
+
"oneOf": [
|
|
641
|
+
{ "type": "array", "items": { "type": "string" }, "minItems": 1 },
|
|
642
|
+
{ "type": "string" }
|
|
643
|
+
]
|
|
607
644
|
},
|
|
608
645
|
"PlanOnlyIndicator": { "$ref": "#/definitions/IndicatorType" },
|
|
609
646
|
"FiledUnder": { "type": "string" },
|
|
@@ -615,9 +652,14 @@
|
|
|
615
652
|
"required": ["Document"],
|
|
616
653
|
"properties": {
|
|
617
654
|
"Document": {
|
|
618
|
-
"
|
|
619
|
-
|
|
620
|
-
|
|
655
|
+
"oneOf": [
|
|
656
|
+
{
|
|
657
|
+
"type": "array",
|
|
658
|
+
"items": { "$ref": "#/definitions/Q1DocumentEntryType" },
|
|
659
|
+
"minItems": 1
|
|
660
|
+
},
|
|
661
|
+
{ "$ref": "#/definitions/Q1DocumentEntryType" }
|
|
662
|
+
]
|
|
621
663
|
}
|
|
622
664
|
}
|
|
623
665
|
},
|
|
@@ -636,9 +678,16 @@
|
|
|
636
678
|
"required": ["UnilateralNoticeEntry"],
|
|
637
679
|
"properties": {
|
|
638
680
|
"UnilateralNoticeEntry": {
|
|
639
|
-
"
|
|
640
|
-
|
|
641
|
-
|
|
681
|
+
"oneOf": [
|
|
682
|
+
{
|
|
683
|
+
"type": "array",
|
|
684
|
+
"items": {
|
|
685
|
+
"$ref": "#/definitions/Q1UnilateralNoticeDetailsType"
|
|
686
|
+
},
|
|
687
|
+
"minItems": 1
|
|
688
|
+
},
|
|
689
|
+
{ "$ref": "#/definitions/Q1UnilateralNoticeDetailsType" }
|
|
690
|
+
]
|
|
642
691
|
}
|
|
643
692
|
}
|
|
644
693
|
},
|
|
@@ -656,11 +705,7 @@
|
|
|
656
705
|
"OfficialCopyDateTime": { "type": "string", "format": "date-time" },
|
|
657
706
|
"EditionDate": { "type": "string", "format": "date" },
|
|
658
707
|
"PricePaidEntry": { "$ref": "#/definitions/Q1PricePaidEntryType" },
|
|
659
|
-
"PropertyAddress": {
|
|
660
|
-
"type": "array",
|
|
661
|
-
"items": { "$ref": "#/definitions/Q1AddressType" },
|
|
662
|
-
"minItems": 1
|
|
663
|
-
},
|
|
708
|
+
"PropertyAddress": { "$ref": "#/definitions/Q1AddressType" },
|
|
664
709
|
"Title": { "$ref": "#/definitions/Q1TitleType" },
|
|
665
710
|
"RegisterEntryIndicators": {
|
|
666
711
|
"$ref": "#/definitions/Q1RegisterEntryIndicatorsType"
|
|
@@ -697,9 +742,10 @@
|
|
|
697
742
|
"type": "object",
|
|
698
743
|
"properties": {
|
|
699
744
|
"EntryText": {
|
|
700
|
-
"
|
|
701
|
-
|
|
702
|
-
|
|
745
|
+
"oneOf": [
|
|
746
|
+
{ "type": "array", "items": { "type": "string" }, "minItems": 0 },
|
|
747
|
+
{ "type": "string" }
|
|
748
|
+
]
|
|
703
749
|
}
|
|
704
750
|
}
|
|
705
751
|
},
|
|
@@ -711,9 +757,10 @@
|
|
|
711
757
|
"EntryDate": { "type": "string" },
|
|
712
758
|
"EntryType": { "type": "string" },
|
|
713
759
|
"EntryText": {
|
|
714
|
-
"
|
|
715
|
-
|
|
716
|
-
|
|
760
|
+
"oneOf": [
|
|
761
|
+
{ "type": "array", "items": { "type": "string" }, "minItems": 1 },
|
|
762
|
+
{ "type": "string" }
|
|
763
|
+
]
|
|
717
764
|
}
|
|
718
765
|
}
|
|
719
766
|
},
|
|
@@ -723,9 +770,14 @@
|
|
|
723
770
|
"properties": {
|
|
724
771
|
"ScheduleType": { "type": "string" },
|
|
725
772
|
"ScheduleEntry": {
|
|
726
|
-
"
|
|
727
|
-
|
|
728
|
-
|
|
773
|
+
"oneOf": [
|
|
774
|
+
{
|
|
775
|
+
"type": "array",
|
|
776
|
+
"items": { "$ref": "#/definitions/Q1RegisterEntryType" },
|
|
777
|
+
"minItems": 1
|
|
778
|
+
},
|
|
779
|
+
{ "$ref": "#/definitions/Q1RegisterEntryType" }
|
|
780
|
+
]
|
|
729
781
|
}
|
|
730
782
|
}
|
|
731
783
|
},
|
|
@@ -735,14 +787,24 @@
|
|
|
735
787
|
"properties": {
|
|
736
788
|
"DistrictDetails": { "$ref": "#/definitions/Q1DistrictDetailsType" },
|
|
737
789
|
"RegisterEntry": {
|
|
738
|
-
"
|
|
739
|
-
|
|
740
|
-
|
|
790
|
+
"oneOf": [
|
|
791
|
+
{
|
|
792
|
+
"type": "array",
|
|
793
|
+
"items": { "$ref": "#/definitions/Q1RegisterEntryType" },
|
|
794
|
+
"minItems": 1
|
|
795
|
+
},
|
|
796
|
+
{ "$ref": "#/definitions/Q1RegisterEntryType" }
|
|
797
|
+
]
|
|
741
798
|
},
|
|
742
799
|
"Schedule": {
|
|
743
|
-
"
|
|
744
|
-
|
|
745
|
-
|
|
800
|
+
"oneOf": [
|
|
801
|
+
{
|
|
802
|
+
"type": "array",
|
|
803
|
+
"items": { "$ref": "#/definitions/Q1ScheduleType" },
|
|
804
|
+
"minItems": 0
|
|
805
|
+
},
|
|
806
|
+
{ "$ref": "#/definitions/Q1ScheduleType" }
|
|
807
|
+
]
|
|
746
808
|
}
|
|
747
809
|
}
|
|
748
810
|
},
|
|
@@ -765,6 +827,7 @@
|
|
|
765
827
|
}
|
|
766
828
|
},
|
|
767
829
|
"type": "object",
|
|
830
|
+
"required": ["OCSummaryData", "OCRegisterData"],
|
|
768
831
|
"properties": {
|
|
769
832
|
"OCSummaryData": {
|
|
770
833
|
"title": "Official Copy Summary Data",
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
const jp = require("jsonpointer");
|
|
2
1
|
const Ajv = require("ajv");
|
|
3
2
|
const addFormats = require("ajv-formats");
|
|
4
3
|
|
|
5
|
-
const { getSubschemaValidator, getTitleAtPath } = require("../../index.js");
|
|
6
|
-
|
|
7
4
|
const verifiedClaimsSchema = require("../schemas/pdtf-verified-claims.json");
|
|
8
5
|
const exampleElectronicRecord = require("../examples/exampleElectronicRecord.json");
|
|
9
6
|
const exampleVouch = require("../examples/exampleVouch.json");
|
|
@@ -11,7 +8,7 @@ const exampleDocumentedVouch = require("../examples/exampleDocumentedVouch.json"
|
|
|
11
8
|
|
|
12
9
|
const ajv = new Ajv({
|
|
13
10
|
allErrors: true,
|
|
14
|
-
strictSchema: false
|
|
11
|
+
strictSchema: false,
|
|
15
12
|
});
|
|
16
13
|
addFormats(ajv);
|
|
17
14
|
|
|
@@ -39,7 +36,7 @@ test("claim with missing claims is invalid", () => {
|
|
|
39
36
|
expect(isValid).toBe(false);
|
|
40
37
|
});
|
|
41
38
|
|
|
42
|
-
test
|
|
39
|
+
test("claim with invalid claims path is invalid", () => {
|
|
43
40
|
const clonedVouch = JSON.parse(JSON.stringify(exampleVouch));
|
|
44
41
|
const originalPath = Object.keys(clonedVouch.claims)[0];
|
|
45
42
|
const data = clonedVouch.claims[originalPath];
|
|
@@ -5,7 +5,7 @@ const {
|
|
|
5
5
|
validator,
|
|
6
6
|
getSubschema,
|
|
7
7
|
getSubschemaValidator,
|
|
8
|
-
getTitleAtPath
|
|
8
|
+
getTitleAtPath,
|
|
9
9
|
} = require("../../index.js");
|
|
10
10
|
const examplePropertyPack = require("../examples/examplePropertyPack.json");
|
|
11
11
|
|
|
@@ -15,6 +15,7 @@ test("exports a property pack schema", () => {
|
|
|
15
15
|
|
|
16
16
|
test("sample is valid", () => {
|
|
17
17
|
const isValid = validator(examplePropertyPack);
|
|
18
|
+
if (!isValid) console.log(validator.errors);
|
|
18
19
|
expect(isValid).toBe(true);
|
|
19
20
|
});
|
|
20
21
|
|
|
@@ -37,12 +38,42 @@ test("sample with missing dependent required fields is invalid", () => {
|
|
|
37
38
|
expect(isValid).toBe(false);
|
|
38
39
|
});
|
|
39
40
|
|
|
41
|
+
test("correctly gets a top level subschema", () => {
|
|
42
|
+
const subschema = getSubschema("/propertyPack");
|
|
43
|
+
expect(subschema.title).toBe("Property Pack");
|
|
44
|
+
});
|
|
45
|
+
|
|
40
46
|
test("correctly gets a subschema", () => {
|
|
41
47
|
const subschema = getSubschema("/propertyPack/materialFacts/notices");
|
|
42
48
|
expect(subschema.title).toBe("Notices which Affect the Property");
|
|
43
49
|
});
|
|
44
50
|
|
|
45
|
-
test("correctly gets a
|
|
51
|
+
test("correctly gets a subschema through an arrays element", () => {
|
|
52
|
+
const subschema = getSubschema(
|
|
53
|
+
"/propertyPack/titlesToBeSold/0/registerExtract"
|
|
54
|
+
);
|
|
55
|
+
expect(subschema.title).toBe("HMLR Official Copy Register Extract");
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
test("correctly gets another subschema through an arrays element", () => {
|
|
59
|
+
const subschema = getSubschema(
|
|
60
|
+
"/propertyPack/sellers/sellerInformation/0/name/firstName"
|
|
61
|
+
);
|
|
62
|
+
expect(subschema.title).toBe("First name");
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
test("correctly gets a subschema validator which is already cached", () => {
|
|
66
|
+
const validator = getSubschemaValidator(
|
|
67
|
+
"/propertyPack/energyPerformanceCertificate"
|
|
68
|
+
);
|
|
69
|
+
expect(validator).not.toBeNull();
|
|
70
|
+
const anotherValidator = getSubschemaValidator(
|
|
71
|
+
"/propertyPack/energyPerformanceCertificate"
|
|
72
|
+
);
|
|
73
|
+
expect(anotherValidator).not.toBeNull();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
test("correctly gets a subschema validator which validates", () => {
|
|
46
77
|
const path = "/propertyPack/materialFacts/notices";
|
|
47
78
|
const validator = getSubschemaValidator(path);
|
|
48
79
|
const data = jp.get(examplePropertyPack, path);
|
|
@@ -86,7 +117,7 @@ test("correctly gets titles across schemas, arrays and non-existient title prope
|
|
|
86
117
|
propertyPackSchema,
|
|
87
118
|
"/propertyPack/titlesToBeSold/0/registerExtract"
|
|
88
119
|
)
|
|
89
|
-
).toBe("
|
|
120
|
+
).toBe("HMLR Official Copy Register Extract");
|
|
90
121
|
expect(
|
|
91
122
|
getTitleAtPath(
|
|
92
123
|
propertyPackSchema,
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://homebuyingandsellinggroup.co.uk/schemas/pdtf-claim.json",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"title": "Property Data Trust Framework Claim",
|
|
6
|
-
"description": "PDTF verified claims are implemented in accordance with the OpenID Connect Verified Claims model, within which the actual claims object should conform to this schema to ensure the necessary metadata is attached",
|
|
7
|
-
"properties": {
|
|
8
|
-
"schema": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"format": "uri",
|
|
11
|
-
"description": "The $id of the JSONSchema against which the path and data have been generated, for example https://homebuyingandsellinggroup.co.uk/schemas/0.1.0/pdtf.json"
|
|
12
|
-
},
|
|
13
|
-
"path": {
|
|
14
|
-
"type": "string",
|
|
15
|
-
"description": "The JSON Pointer reference to the location in the schema corresponding to the new data as defined at https://datatracker.ietf.org/doc/html/rfc6901, for example /propertyPack/propertyToBeSold/address"
|
|
16
|
-
},
|
|
17
|
-
"data": {
|
|
18
|
-
"type": "string",
|
|
19
|
-
"description": "A JSON object representing the segment of the overall data structure which is being provided."
|
|
20
|
-
},
|
|
21
|
-
"attribution": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "Details of any attribution, copyright or licencing requirements relating to the provided data"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"required": ["schema", "path", "data"]
|
|
27
|
-
}
|