{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$ref": "#/definitions/SetupResponse",
    "definitions": {
        "SetupResponse": {
            "type": "object",
            "properties": {
                "headers": {
                    "type": "object",
                    "properties": {
                        "set-cookie": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "description": "Should hold the apple authentication",
                            "minItems": 1
                        }
                    },
                    "required": [
                        "set-cookie"
                    ]
                },
                "data": {
                    "type": "object",
                    "properties": {
                        "dsInfo": {
                            "type": "object",
                            "properties": {
                                "isWebAccessAllowed": {
                                    "type": "boolean",
                                    "const": true,
                                    "description": "Web access is necessary for the application"
                                }
                            },
                            "required": [
                                "isWebAccessAllowed"
                            ]
                        },
                        "webservices": {
                            "type": "object",
                            "properties": {
                                "ckdatabasews": {
                                    "type": "object",
                                    "properties": {
                                        "url": {
                                            "type": "string",
                                            "minLength": 1
                                        },
                                        "pcsRequired": {
                                            "type": "boolean",
                                            "description": "Shows if additional PCS cookies are required - if missing not necessary"
                                        },
                                        "status": {
                                            "type": "string",
                                            "const": "active",
                                            "description": "Service needs to be active"
                                        }
                                    },
                                    "required": [
                                        "url",
                                        "status"
                                    ],
                                    "description": "Service for iCloud Photos"
                                }
                            },
                            "required": [
                                "ckdatabasews"
                            ],
                            "description": "Holds the dynamic iCloud service URLs"
                        }
                    },
                    "required": [
                        "dsInfo",
                        "webservices"
                    ]
                }
            },
            "required": [
                "headers",
                "data"
            ],
            "description": "The expected response format for the account setup request"
        }
    }
}
