I'm getting errors saying it needs an array, then if I change it to an array it says it needs an object, then it says it doesn't include all the required properties. Here is schema:
{
"type": "array",
"items": {
"type": "object",
"properties": {
"__metadata": {
"type": "object",
"properties": {
"id": { "type": "string" },
"uri": { "type": "string" },
"type": { "type": "string" }
}
},
"likedBy": {
"type": "object",
"properties": {
"__deferred": {
"type": "object",
"properties": {
"uri": { "type": "string" }
}
}
}
},
"replies": {
"type": "object",
"properties": {
"__deferred": {
"type": "object",
"properties": {
"uri": { "type": "string" }
}
}
}
},
"author": {
"type": "object",
"properties": {
"__metadata": {
"type": "object",
"properties": {
"type": { "type": "string" }
}
},
"directoryObjectId": {},
"email": { "type": "string" },
"expiration": {},
"id": { "type": "integer" },
"isActive": { "type": "boolean" },
"isExternal": { "type": "boolean" },
"jobTitle": {},
"loginName": { "type": "string" },
"name": { "type": "string" },
"principalType": { "type": "integer" },
"userId": {},
"userPrincipalName": {}
}
},
"createdDate": { "type": "string" },
"id": { "type": "string" },
"isLikedByUser": { "type": "boolean" },
"isReply": { "type": "boolean" },
"itemId": { "type": "integer" },
"likeCount": { "type": "integer" },
"listId": { "type": "string" },
"mentions": {
"type": "object",
"properties": {
"__metadata": {
"type": "object",
"properties": {
"type": { "type": "string" }
}
},
"results": { "type": "array" }
}
},
"modifiedDate": {},
"parentId": { "type": "string" },
"replyCount": { "type": "integer" },
"text": { "type": "string" }
},
"required": [
"__metadata",
"likedBy",
"replies",
"author",
"createdDate",
"id",
"isLikedByUser",
"isReply",
"itemId",
"likeCount",
"listId",
"mentions",
"modifiedDate",
"parentId",
"replyCount",
"text"
]
}
}