{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "definitions": {
        "absolute_path": {
            "description": "A path only. Query string and/or fragment are not allowed.",
            "pattern": "^/(([a-zA-Z0-9._~!$&'()*+,;=:@-]|%[0-9a-fA-F]{2})+(/([a-zA-Z0-9._~!$&'()*+,;=:@-]|%[0-9a-fA-F]{2})*)*)?$",
            "type": "string"
        },
        "access_limited": {
            "additionalProperties": false,
            "properties": {
                "auth_bypass_ids": {
                    "$ref": "#/definitions/guid_list",
                    "description": "Deprecated: auth_bypass_ids should be sent as a separate field"
                },
                "organisations": {
                    "$ref": "#/definitions/guid_list",
                    "description": "A list of organisation content ids permitted access to this item"
                },
                "users": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                }
            },
            "type": "object"
        },
        "analytics_identifier": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "description": "A short identifier we send to Google Analytics for multi-valued fields. This means we avoid the truncated values we would get if we sent the path or slug of eg organisations."
        },
        "body_html_and_govspeak": {
            "anyOf": [
                {
                    "$ref": "#/definitions/multiple_content_types"
                }
            ],
            "description": "The main content provided as HTML with the govspeak markdown it's rendered from"
        },
        "country": {
            "additionalProperties": false,
            "properties": {
                "name": {
                    "type": "string"
                },
                "slug": {
                    "type": "string"
                },
                "synonyms": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                }
            },
            "required": [
                "slug",
                "name"
            ],
            "type": "object"
        },
        "description": {
            "type": "string"
        },
        "description_optional": {
            "anyOf": [
                {
                    "$ref": "#/definitions/description"
                },
                {
                    "type": "null"
                }
            ]
        },
        "details": {
            "additionalProperties": false,
            "properties": {
                "alert_status": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "change_description": {
                    "type": "string"
                },
                "country": {
                    "$ref": "#/definitions/country"
                },
                "document": {
                    "$ref": "#/definitions/file_attachment_asset"
                },
                "email_signup_link": {
                    "$ref": "#/definitions/email_signup_link"
                },
                "image": {
                    "$ref": "#/definitions/image_asset"
                },
                "max_cache_time": {
                    "$ref": "#/definitions/max_cache_time"
                },
                "parts": {
                    "$ref": "#/definitions/parts"
                },
                "publishing_request_id": {
                    "$ref": "#/definitions/publishing_request_id"
                },
                "reviewed_at": {
                    "_format": "date-time",
                    "type": "string"
                },
                "summary": {
                    "$ref": "#/definitions/multiple_content_types"
                },
                "updated_at": {
                    "_format": "date-time",
                    "type": "string"
                }
            },
            "required": [
                "summary",
                "country",
                "updated_at",
                "reviewed_at",
                "change_description",
                "alert_status",
                "email_signup_link",
                "parts"
            ],
            "type": "object"
        },
        "email_signup_link": {
            "_format": "uri",
            "description": "Path to email signup form. TODO: Check if can be switched to use links instead",
            "type": "string"
        },
        "file_attachment_asset": {
            "additionalProperties": false,
            "properties": {
                "accessible": {
                    "type": "boolean"
                },
                "alternative_format_contact_email": {
                    "type": "string"
                },
                "attachment_type": {
                    "enum": [
                        "file"
                    ],
                    "type": "string"
                },
                "content_type": {
                    "type": "string"
                },
                "file_size": {
                    "type": "integer"
                },
                "filename": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "locale": {
                    "$ref": "#/definitions/locale"
                },
                "number_of_pages": {
                    "type": "integer"
                },
                "preview_url": {
                    "_format": "uri",
                    "type": "string"
                },
                "title": {
                    "type": "string"
                },
                "url": {
                    "_format": "uri",
                    "type": "string"
                }
            },
            "required": [
                "attachment_type",
                "content_type",
                "id",
                "url"
            ],
            "type": "object"
        },
        "first_published_at": {
            "_format": "date-time",
            "description": "The date the content was first published.  Automatically determined by the publishing-api, unless overridden by the publishing application.",
            "type": "string"
        },
        "guid": {
            "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$",
            "type": "string"
        },
        "guid_list": {
            "items": {
                "$ref": "#/definitions/guid"
            },
            "type": "array",
            "_uniqueItems": true
        },
        "image_asset": {
            "additionalProperties": false,
            "properties": {
                "alt_text": {
                    "type": "string"
                },
                "caption": {
                    "type": "string"
                },
                "content_type": {
                    "type": "string"
                },
                "credit": {
                    "type": "string"
                },
                "url": {
                    "_format": "uri",
                    "type": "string"
                }
            },
            "required": [
                "content_type",
                "url"
            ],
            "type": "object"
        },
        "locale": {
            "enum": [
                "ar",
                "az",
                "be",
                "bg",
                "bn",
                "cs",
                "cy",
                "da",
                "de",
                "dr",
                "el",
                "en",
                "es",
                "es-419",
                "et",
                "fa",
                "fi",
                "fr",
                "gd",
                "he",
                "hi",
                "hr",
                "hu",
                "hy",
                "id",
                "is",
                "it",
                "ja",
                "ka",
                "kk",
                "ko",
                "lt",
                "lv",
                "ms",
                "mt",
                "nl",
                "no",
                "pl",
                "ps",
                "pt",
                "ro",
                "ru",
                "si",
                "sk",
                "sl",
                "so",
                "sq",
                "sr",
                "sv",
                "sw",
                "ta",
                "th",
                "tk",
                "tr",
                "uk",
                "ur",
                "uz",
                "vi",
                "zh",
                "zh-hk",
                "zh-tw"
            ],
            "type": "string"
        },
        "max_cache_time": {
            "description": "The maximum length of time the content should be cached, in seconds",
            "type": "integer"
        },
        "multiple_content_types": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "content": {
                        "type": "string"
                    },
                    "content_type": {
                        "type": "string"
                    }
                },
                "required": [
                    "content_type",
                    "content"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "parts": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "body": {
                        "$ref": "#/definitions/body_html_and_govspeak"
                    },
                    "slug": {
                        "_format": "uri",
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    }
                },
                "required": [
                    "title",
                    "slug",
                    "body"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "public_updated_at": {
            "_format": "date-time",
            "description": "When the content was last significantly changed (a major update). Shown to users.  Automatically determined by the publishing-api, unless overridden by the publishing application.",
            "type": "string"
        },
        "publishing_app_name": {
            "description": "The application that published this item.",
            "enum": [
                "calculators",
                "calendars",
                "collections-publisher",
                "contacts",
                "content-publisher",
                "content-tagger",
                "email-alert-frontend",
                "external-link-tracker",
                "feedback",
                "frontend",
                "government-frontend",
                "hmrc-manuals-api",
                "info-frontend",
                "licencefinder",
                "local-links-manager",
                "manuals-frontend",
                "manuals-publisher",
                "maslow",
                "performanceplatform-big-screen-view",
                "publisher",
                "rummager",
                "search-admin",
                "search-api",
                "service-manual-publisher",
                "share-sale-publisher",
                "short-url-manager",
                "smartanswers",
                "special-route-publisher",
                "specialist-publisher",
                "static",
                "tariff",
                "travel-advice-publisher",
                "whitehall"
            ],
            "type": "string"
        },
        "publishing_request_id": {
            "description": "A unique identifier used to track publishing requests to rendered content",
            "oneOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ]
        },
        "rendering_app": {
            "description": "The application that renders this item.",
            "enum": [
                "calculators",
                "calendars",
                "collections",
                "content-store",
                "email-alert-frontend",
                "email-campaign-frontend",
                "feedback",
                "finder-frontend",
                "frontend",
                "government-frontend",
                "info-frontend",
                "licencefinder",
                "manuals-frontend",
                "performanceplatform-big-screen-view",
                "rummager",
                "search-api",
                "service-manual-frontend",
                "smartanswers",
                "spotlight",
                "static",
                "tariff",
                "whitehall-admin",
                "whitehall-frontend"
            ],
            "type": "string"
        },
        "route": {
            "additionalProperties": false,
            "properties": {
                "path": {
                    "type": "string"
                },
                "type": {
                    "enum": [
                        "prefix",
                        "exact"
                    ]
                }
            },
            "required": [
                "path",
                "type"
            ],
            "type": "object"
        },
        "routes": {
            "items": {
                "$ref": "#/definitions/route"
            },
            "minItems": 1,
            "type": "array"
        },
        "title": {
            "type": "string"
        },
        "update_type": {
            "enum": [
                "major",
                "minor",
                "republish"
            ]
        }
    },
    "properties": {
        "access_limited": {
            "$ref": "#/definitions/access_limited"
        },
        "analytics_identifier": {
            "$ref": "#/definitions/analytics_identifier"
        },
        "auth_bypass_ids": {
            "$ref": "#/definitions/guid_list",
            "description": "A list of ids that will allow access to this item for non-authenticated users"
        },
        "base_path": {
            "$ref": "#/definitions/absolute_path"
        },
        "bulk_publishing": {
            "type": "boolean"
        },
        "change_note": {
            "type": [
                "null",
                "string"
            ]
        },
        "description": {
            "$ref": "#/definitions/description_optional"
        },
        "details": {
            "$ref": "#/definitions/details"
        },
        "document_type": {
            "enum": [
                "travel_advice"
            ],
            "type": "string"
        },
        "first_published_at": {
            "$ref": "#/definitions/first_published_at"
        },
        "last_edited_at": {
            "_format": "date-time",
            "description": "Last time when the content received a major or minor update.",
            "type": "string"
        },
        "links": {
            "additionalProperties": false,
            "properties": {
                "policy_areas": {
                    "$ref": "#/definitions/guid_list",
                    "description": "A largely deprecated tag currently only used to power email alerts."
                }
            },
            "type": "object"
        },
        "locale": {
            "$ref": "#/definitions/locale"
        },
        "need_ids": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "phase": {
            "description": "The service design phase of this content item - https://www.gov.uk/service-manual/phases",
            "enum": [
                "alpha",
                "beta",
                "live"
            ],
            "type": "string"
        },
        "previous_version": {
            "type": "string"
        },
        "public_updated_at": {
            "$ref": "#/definitions/public_updated_at"
        },
        "publishing_app": {
            "$ref": "#/definitions/publishing_app_name"
        },
        "redirects": {
            "additionalItems": false,
            "items": {},
            "type": "array"
        },
        "rendering_app": {
            "$ref": "#/definitions/rendering_app"
        },
        "routes": {
            "$ref": "#/definitions/routes"
        },
        "schema_name": {
            "enum": [
                "travel_advice"
            ],
            "type": "string"
        },
        "title": {
            "$ref": "#/definitions/title"
        },
        "update_type": {
            "$ref": "#/definitions/update_type"
        }
    },
    "required": [
        "base_path",
        "details",
        "document_type",
        "publishing_app",
        "rendering_app",
        "routes",
        "schema_name",
        "title"
    ],
    "type": "object"
}