{
    "required": [
        "results",
        "start",
        "limit",
        "size",
        "_links"
    ],
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "__comment_source": "https://answers.atlassian.com/questions/39570227/confluence-rest-json-schema",
    "properties": {
        "results": {
            "items": {
                "required": [
                    "id",
                    "type",
                    "status",
                    "title",
                    "space",
                    "history",
                    "body",
                    "metadata",
                    "_links",
                    "_expandable"
                ],
                "type": "object",
                "properties": {
                    "space": {
                        "required": [
                            "id",
                            "key",
                            "name",
                            "type",
                            "_links",
                            "_expandable"
                        ],
                        "type": "object",
                        "properties": {
                            "_links": {
                                "required": [
                                    "webui",
                                    "self"
                                ],
                                "type": "object",
                                "properties": {
                                    "webui": {
                                        "type": "string"
                                    },
                                    "self": {
                                        "type": "string"
                                    }
                                }
                            },
                            "key": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "id": {
                                "type": "integer"
                            },
                            "type": {
                                "type": "string"
                            },
                            "_expandable": {
                                "required": [
                                    "metadata",
                                    "icon",
                                    "description",
                                    "homepage"
                                ],
                                "type": "object",
                                "properties": {
                                    "homepage": {
                                        "type": "string"
                                    },
                                    "icon": {
                                        "type": "string"
                                    },
                                    "metadata": {
                                        "type": "string"
                                    },
                                    "description": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "status": {
                        "type": "string"
                    },
                    "history": {
                        "required": [
                            "latest",
                            "createdBy",
                            "createdDate",
                            "_links",
                            "_expandable"
                        ],
                        "type": "object",
                        "properties": {
                            "createdBy": {
                                "required": [
                                    "type",
                                    "username",
                                    "userKey",
                                    "profilePicture",
                                    "displayName",
                                    "_links"
                                ],
                                "type": "object",
                                "properties": {
                                    "profilePicture": {
                                        "required": [
                                            "path",
                                            "width",
                                            "height",
                                            "isDefault"
                                        ],
                                        "type": "object",
                                        "properties": {
                                            "height": {
                                                "type": "integer"
                                            },
                                            "path": {
                                                "type": "string"
                                            },
                                            "width": {
                                                "type": "integer"
                                            },
                                            "isDefault": {
                                                "type": "boolean"
                                            }
                                        }
                                    },
                                    "username": {
                                        "type": "string"
                                    },
                                    "_links": {
                                        "required": [
                                            "self"
                                        ],
                                        "type": "object",
                                        "properties": {
                                            "self": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "displayName": {
                                        "type": "string"
                                    },
                                    "type": {
                                        "type": "string"
                                    },
                                    "userKey": {
                                        "type": "string"
                                    }
                                }
                            },
                            "createdDate": {
                                "type": "string"
                            },
                            "_links": {
                                "required": [
                                    "self"
                                ],
                                "type": "object",
                                "properties": {
                                    "self": {
                                        "type": "string"
                                    }
                                }
                            },
                            "latest": {
                                "type": "boolean"
                            },
                            "_expandable": {
                                "required": [
                                    "lastUpdated",
                                    "previousVersion",
                                    "contributors",
                                    "nextVersion"
                                ],
                                "type": "object",
                                "properties": {
                                    "lastUpdated": {
                                        "type": "string"
                                    },
                                    "nextVersion": {
                                        "type": "string"
                                    },
                                    "contributors": {
                                        "type": "string"
                                    },
                                    "previousVersion": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "body": {
                        "required": [
                            "view",
                            "export_view",
                            "_expandable"
                        ],
                        "type": "object",
                        "properties": {
                            "view": {
                                "required": [
                                    "value",
                                    "representation",
                                    "_expandable"
                                ],
                                "type": "object",
                                "properties": {
                                    "value": {
                                        "type": "string"
                                    },
                                    "_expandable": {
                                        "required": [
                                            "webresource",
                                            "content"
                                        ],
                                        "type": "object",
                                        "properties": {
                                            "webresource": {
                                                "type": "string"
                                            },
                                            "content": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "representation": {
                                        "type": "string"
                                    }
                                }
                            },
                            "_expandable": {
                                "required": [
                                    "editor",
                                    "styled_view",
                                    "storage",
                                    "anonymous_export_view"
                                ],
                                "type": "object",
                                "properties": {
                                    "storage": {
                                        "type": "string"
                                    },
                                    "anonymous_export_view": {
                                        "type": "string"
                                    },
                                    "editor": {
                                        "type": "string"
                                    },
                                    "styled_view": {
                                        "type": "string"
                                    }
                                }
                            },
                            "export_view": {
                                "required": [
                                    "value",
                                    "representation",
                                    "_expandable"
                                ],
                                "type": "object",
                                "properties": {
                                    "value": {
                                        "type": "string"
                                    },
                                    "_expandable": {
                                        "required": [
                                            "webresource",
                                            "content"
                                        ],
                                        "type": "object",
                                        "properties": {
                                            "webresource": {
                                                "type": "string"
                                            },
                                            "content": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "representation": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "_links": {
                        "required": [
                            "webui",
                            "tinyui",
                            "self"
                        ],
                        "type": "object",
                        "properties": {
                            "webui": {
                                "type": "string"
                            },
                            "tinyui": {
                                "type": "string"
                            },
                            "self": {
                                "type": "string"
                            }
                        }
                    },
                    "metadata": {
                        "required": [
                            "labels",
                            "_expandable"
                        ],
                        "type": "object",
                        "properties": {
                            "labels": {
                                "required": [
                                    "results",
                                    "start",
                                    "limit",
                                    "size",
                                    "_links"
                                ],
                                "type": "object",
                                "properties": {
                                    "results": {
                                        "items": {},
                                        "type": "array"
                                    },
                                    "size": {
                                        "type": "integer"
                                    },
                                    "start": {
                                        "type": "integer"
                                    },
                                    "_links": {
                                        "required": [
                                            "self"
                                        ],
                                        "type": "object",
                                        "properties": {
                                            "self": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "limit": {
                                        "type": "integer"
                                    }
                                }
                            },
                            "_expandable": {
                                "required": [
                                    "currentuser",
                                    "properties"
                                ],
                                "type": "object",
                                "properties": {
                                    "currentuser": {
                                        "type": "string"
                                    },
                                    "properties": {
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    },
                    "id": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "_expandable": {
                        "required": [
                            "container",
                            "operations",
                            "children",
                            "ancestors",
                            "version",
                            "descendants"
                        ],
                        "type": "object",
                        "properties": {
                            "children": {
                                "type": "string"
                            },
                            "descendants": {
                                "type": "string"
                            },
                            "container": {
                                "type": "string"
                            },
                            "version": {
                                "type": "string"
                            },
                            "ancestors": {
                                "type": "string"
                            },
                            "operations": {
                                "type": "string"
                            }
                        }
                    }
                }
            },
            "type": "array"
        },
        "size": {
            "type": "integer"
        },
        "start": {
            "type": "integer"
        },
        "_links": {
            "required": [
                "self",
                "base",
                "context"
            ],
            "type": "object",
            "properties": {
                "context": {
                    "type": "string"
                },
                "base": {
                    "type": "string"
                },
                "self": {
                    "type": "string"
                }
            }
        },
        "limit": {
            "type": "integer"
        }
    }
}