Hi, my schema:
{
"data": {
"me": {
"firstName": "David",
"lastName": "Robert",
"myNumber": "ZZ",
"myBranch": {
"cCode": "GB",
"eNumber": "3089800"
},
"myAccount": {
"contactId": "000AAA111"
}
}
}
}
I’ve previously written the test for others schemas like so:
// schema
const schema = {
"type": "object",
"properties": {
"id": { "type": "string" },
"tel":{ "type":"number" },
"position":{ "type":"string" }
},
"required": [
"id",
"tel",
"position",
],
"additionalProperties":false,
}
pm.test("Schema should be valid", () => {
pm.response.to.have.jsonSchema(schema);
});
But I’ve tried various ways but I can’t seem to modify the test I’ve written previously to suit the new schema objects and properties that are at different levels?! what’s the best way to do it? various levels?!