@pdtf/schemas 0.6.14 → 0.7.1
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 +7 -6
- package/package.json +1 -1
- package/src/examples/exampleTransaction.json +31 -47
- package/src/mappings/adf.js +198 -0
- package/src/schemas/{baspi-b-legal-information.json → legal-information.json} +29 -58
- package/src/schemas/{baspi-a-material-facts.json → material-facts.json} +572 -197
- package/src/schemas/pdtf-transaction.json +9 -4
- package/src/tests/transactionSchema.test.js +4 -4
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
"properties": {
|
|
41
41
|
"firstName": {
|
|
42
42
|
"title": "First name",
|
|
43
|
-
"type": "string"
|
|
43
|
+
"type": "string",
|
|
44
|
+
"minLength": 1
|
|
44
45
|
},
|
|
45
46
|
"middleName": {
|
|
46
47
|
"title": "Middle name(s)",
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
},
|
|
49
50
|
"lastName": {
|
|
50
51
|
"title": "lastName",
|
|
51
|
-
"type": "string"
|
|
52
|
+
"type": "string",
|
|
53
|
+
"minLength": 1
|
|
52
54
|
},
|
|
53
55
|
"preferredName": {
|
|
54
56
|
"title": "Preferred name / known as",
|
|
@@ -93,6 +95,9 @@
|
|
|
93
95
|
"Buyer's Conveyancer",
|
|
94
96
|
"Estate Agent"
|
|
95
97
|
]
|
|
98
|
+
},
|
|
99
|
+
"externalIds": {
|
|
100
|
+
"type": "object"
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
}
|
|
@@ -102,10 +107,10 @@
|
|
|
102
107
|
"type": "object",
|
|
103
108
|
"properties": {
|
|
104
109
|
"materialFacts": {
|
|
105
|
-
"$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/
|
|
110
|
+
"$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/material-facts.json"
|
|
106
111
|
},
|
|
107
112
|
"additionalLegalInfo": {
|
|
108
|
-
"$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/
|
|
113
|
+
"$ref": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/legal-information.json"
|
|
109
114
|
},
|
|
110
115
|
"titlesToBeSold": {
|
|
111
116
|
"RDSRef": "",
|
|
@@ -90,14 +90,14 @@ test("correctly gets a subschema through a dependency", () => {
|
|
|
90
90
|
|
|
91
91
|
test("correctly gets another subschema through a dependency", () => {
|
|
92
92
|
const subschema = getSubschema(
|
|
93
|
-
"/propertyPack/materialFacts/ownership/
|
|
93
|
+
"/propertyPack/materialFacts/ownership/lengthOfLeaseInYears"
|
|
94
94
|
);
|
|
95
95
|
expect(subschema.title).toBe("Length of lease (years)");
|
|
96
96
|
});
|
|
97
97
|
|
|
98
98
|
test("correctly gets yet another subschema through a dependency", () => {
|
|
99
99
|
const subschema = getSubschema(
|
|
100
|
-
"/propertyPack/materialFacts/ownership/
|
|
100
|
+
"/propertyPack/materialFacts/ownership/rentIncrease/details"
|
|
101
101
|
);
|
|
102
102
|
expect(subschema.title).toBe("Details");
|
|
103
103
|
});
|
|
@@ -143,13 +143,13 @@ test("correctly gets titles across schemas, arrays and non-existient title prope
|
|
|
143
143
|
expect(
|
|
144
144
|
getTitleAtPath(
|
|
145
145
|
transactionSchema,
|
|
146
|
-
"/propertyPack/materialFacts/ownership/
|
|
146
|
+
"/propertyPack/materialFacts/ownership/lengthOfLeaseInYears"
|
|
147
147
|
)
|
|
148
148
|
).toBe("Length of lease (years)");
|
|
149
149
|
expect(
|
|
150
150
|
getTitleAtPath(
|
|
151
151
|
transactionSchema,
|
|
152
|
-
"/propertyPack/materialFacts/ownership/
|
|
152
|
+
"/propertyPack/materialFacts/ownership/annualServiceCharge"
|
|
153
153
|
)
|
|
154
154
|
).toBe(
|
|
155
155
|
"Amount of current annual service charge/estate rentcharge/maintenance contribution (£)"
|