{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "required": [
        "base_path",
        "details",
        "document_type",
        "publishing_app",
        "rendering_app",
        "routes",
        "schema_name",
        "title"
    ],
    "additionalProperties": false,
    "properties": {
        "access_limited": {
            "$ref": "#/definitions/access_limited"
        },
        "analytics_identifier": {
            "$ref": "#/definitions/analytics_identifier"
        },
        "auth_bypass_ids": {
            "description": "A list of ids that will allow access to this item for non-authenticated users",
            "$ref": "#/definitions/guid_list"
        },
        "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": {
            "type": "string",
            "enum": [
                "aaib_report",
                "about",
                "about_our_services",
                "accessible_documents_policy",
                "access_and_opening",
                "ambassador_role",
                "answer",
                "asylum_support_decision",
                "authored_article",
                "board_member_role",
                "business_finance_support_scheme",
                "calculator",
                "calendar",
                "case_study",
                "chief_professional_officer_role",
                "chief_scientific_officer_role",
                "chief_scientific_advisor_role",
                "closed_consultation",
                "cma_case",
                "coming_soon",
                "complaints_procedure",
                "completed_transaction",
                "consultation",
                "consultation_outcome",
                "contact",
                "coronavirus_landing_page",
                "corporate_report",
                "correspondence",
                "countryside_stewardship_grant",
                "decision",
                "deputy_head_of_mission_role",
                "detailed_guidance",
                "detailed_guide",
                "dfid_research_output",
                "document_collection",
                "drug_safety_update",
                "email_alert_signup",
                "employment_appeal_tribunal_decision",
                "employment_tribunal_decision",
                "equality_and_diversity",
                "esi_fund",
                "export_health_certificate",
                "external_content",
                "facet",
                "facet_group",
                "facet_value",
                "fatality_notice",
                "field_of_operation",
                "finder",
                "finder_email_signup",
                "foi_release",
                "form",
                "gone",
                "government",
                "government_response",
                "governor_role",
                "guidance",
                "guide",
                "help_page",
                "high_commissioner_role",
                "history",
                "hmrc_manual",
                "hmrc_manual_section",
                "homepage",
                "html_publication",
                "impact_assessment",
                "imported",
                "independent_report",
                "international_development_fund",
                "international_treaty",
                "knowledge_alpha",
                "licence",
                "license_finder",
                "local_transaction",
                "maib_report",
                "mainstream_browse_page",
                "manual",
                "manual_section",
                "map",
                "marine_notice",
                "media_enquiries",
                "medical_safety_alert",
                "membership",
                "military_role",
                "ministerial_role",
                "ministers_index",
                "national",
                "national_statistics",
                "national_statistics_announcement",
                "need",
                "news_article",
                "news_story",
                "notice",
                "official",
                "official_statistics",
                "official_statistics_announcement",
                "open_consultation",
                "oral_statement",
                "organisation",
                "our_energy_use",
                "our_governance",
                "person",
                "personal_information_charter",
                "petitions_and_campaigns",
                "place",
                "placeholder",
                "placeholder_ministerial_role",
                "placeholder_organisation",
                "placeholder_person",
                "placeholder_policy_area",
                "placeholder_topical_event",
                "placeholder_world_location",
                "placeholder_world_location_news_page",
                "placeholder_worldwide_organisation",
                "policy_area",
                "policy_paper",
                "press_release",
                "procurement",
                "promotional",
                "publication_scheme",
                "raib_report",
                "recruitment",
                "redirect",
                "regulation",
                "research",
                "residential_property_tribunal_decision",
                "role_appointment",
                "search",
                "service_manual_guide",
                "service_manual_homepage",
                "service_manual_service_standard",
                "service_manual_service_toolkit",
                "service_manual_topic",
                "service_sign_in",
                "service_standard_report",
                "services_and_information",
                "simple_smart_answer",
                "smart_answer",
                "social_media_use",
                "special_representative_role",
                "special_route",
                "speech",
                "staff_update",
                "statistical_data_set",
                "statistics",
                "statistics_announcement",
                "statutory_guidance",
                "statutory_instrument",
                "step_by_step_nav",
                "take_part",
                "tax_tribunal_decision",
                "taxon",
                "terms_of_reference",
                "topic",
                "topical_event",
                "topical_event_about_page",
                "traffic_commissioner_regulatory_decision",
                "traffic_commissioner_role",
                "transaction",
                "transparency",
                "travel_advice",
                "travel_advice_index",
                "unpublishing",
                "uk_market_conformity_assessment_body",
                "utaac_decision",
                "vanish",
                "welsh_language_scheme",
                "working_group",
                "world_location",
                "world_location_news_article",
                "world_news_story",
                "worldwide_office_staff_role",
                "worldwide_organisation",
                "written_statement"
            ]
        },
        "first_published_at": {
            "$ref": "#/definitions/first_published_at"
        },
        "last_edited_at": {
            "description": "Last time when the content received a major or minor update.",
            "type": "string",
            "format": "date-time"
        },
        "links": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "featured_policies": {
                    "description": "Featured policies primarily for use with Whitehall organisations. Deprecated in favour of ordered_featured_policies.",
                    "$ref": "#/definitions/guid_list"
                },
                "policy_areas": {
                    "description": "A largely deprecated tag currently only used to power email alerts.",
                    "$ref": "#/definitions/guid_list"
                }
            }
        },
        "locale": {
            "$ref": "#/definitions/locale"
        },
        "need_ids": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "phase": {
            "description": "The service design phase of this content item - https://www.gov.uk/service-manual/phases",
            "type": "string",
            "enum": [
                "alpha",
                "beta",
                "live"
            ]
        },
        "previous_version": {
            "type": "string"
        },
        "public_updated_at": {
            "$ref": "#/definitions/public_updated_at"
        },
        "publishing_app": {
            "$ref": "#/definitions/publishing_app_name"
        },
        "redirects": {
            "type": "array",
            "additionalItems": false,
            "items": {}
        },
        "rendering_app": {
            "$ref": "#/definitions/rendering_app"
        },
        "routes": {
            "$ref": "#/definitions/routes"
        },
        "schema_name": {
            "description": "Should be of the form 'placeholder_my_format_name'. 'placeholder' is allowed for backwards compatibility.",
            "type": "string",
            "pattern": "^(placeholder|placeholder_.+)$"
        },
        "title": {
            "$ref": "#/definitions/title"
        },
        "update_type": {
            "$ref": "#/definitions/update_type"
        }
    },
    "definitions": {
        "description": {
            "type": "string"
        },
        "absolute_path": {
            "description": "A path only. Query string and/or fragment are not allowed.",
            "type": "string",
            "pattern": "^/(([a-zA-Z0-9._~!$&'()*+,;=:@-]|%[0-9a-fA-F]{2})+(/([a-zA-Z0-9._~!$&'()*+,;=:@-]|%[0-9a-fA-F]{2})*)*)?$"
        },
        "access_limited": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "auth_bypass_ids": {
                    "description": "Deprecated: auth_bypass_ids should be sent as a separate field",
                    "$ref": "#/definitions/guid_list"
                },
                "organisations": {
                    "description": "A list of organisation content ids permitted access to this item",
                    "$ref": "#/definitions/guid_list"
                },
                "users": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "analytics_identifier": {
            "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.",
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ]
        },
        "change_note": {
            "description": "Change note for the most recent update",
            "type": [
                "string",
                "null"
            ]
        },
        "description_optional": {
            "anyOf": [
                {
                    "$ref": "#/definitions/description"
                },
                {
                    "type": "null"
                }
            ]
        },
        "details": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "analytics_identifier": {
                    "$ref": "#/definitions/analytics_identifier"
                },
                "brand": {
                    "description": "Used for organisations, to allow us to publish branding / logo information. Remove when organisations are migrated.",
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "change_note": {
                    "$ref": "#/definitions/change_note"
                },
                "end_date": {
                    "description": "Used for topical events, so that related documents can get the date. Remove when topical events are migrated.",
                    "type": "string",
                    "format": "date-time"
                },
                "external_related_links": {
                    "$ref": "#/definitions/external_related_links"
                },
                "logo": {
                    "description": "Used for organisations, to allow us to publish branding / logo information. Remove when organisations are migrated.",
                    "type": "object",
                    "properties": {
                        "crest": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "bis",
                                "dit",
                                "eo",
                                "hmrc",
                                "ho",
                                "mod",
                                "portcullis",
                                "single-identity",
                                "so",
                                "ukaea",
                                "wales",
                                null
                            ]
                        },
                        "formatted_title": {
                            "type": "string"
                        },
                        "image": {
                            "$ref": "#/definitions/image"
                        }
                    }
                },
                "start_date": {
                    "description": "Used for topical events, so that related documents can get the date. Remove when topical events are migrated.",
                    "type": "string",
                    "format": "date-time"
                },
                "tags": {
                    "$ref": "#/definitions/tags"
                }
            }
        },
        "external_link": {
            "type": "object",
            "required": [
                "title",
                "url"
            ],
            "additionalProperties": false,
            "properties": {
                "title": {
                    "type": "string"
                },
                "url": {
                    "type": "string",
                    "format": "uri"
                }
            }
        },
        "external_related_links": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/external_link"
            }
        },
        "first_published_at": {
            "description": "The date the content was first published.  Automatically determined by the publishing-api, unless overridden by the publishing application.",
            "type": "string",
            "format": "date-time"
        },
        "guid": {
            "type": "string",
            "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$"
        },
        "guid_list": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/guid"
            },
            "_uniqueItems": true
        },
        "image": {
            "type": "object",
            "required": [
                "url"
            ],
            "additionalProperties": false,
            "properties": {
                "alt_text": {
                    "type": "string"
                },
                "caption": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "credit": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "high_resolution_url": {
                    "description": "URL to a high resolution version of the image, for use by third parties such as Twitter, Facebook or Slack. Used by the machine readable metadata component. Don't use this on user-facing web pages, as it might be very large.",
                    "type": "string",
                    "format": "uri"
                },
                "url": {
                    "description": "URL to the image. The image should be in a suitable resolution for display on the page.",
                    "type": "string",
                    "format": "uri"
                }
            }
        },
        "locale": {
            "type": "string",
            "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"
            ]
        },
        "public_updated_at": {
            "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",
            "format": "date-time"
        },
        "publishing_app_name": {
            "description": "The application that published this item.",
            "type": "string",
            "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"
            ]
        },
        "rendering_app": {
            "description": "The application that renders this item.",
            "type": "string",
            "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"
            ]
        },
        "route": {
            "type": "object",
            "required": [
                "path",
                "type"
            ],
            "additionalProperties": false,
            "properties": {
                "path": {
                    "type": "string"
                },
                "type": {
                    "enum": [
                        "prefix",
                        "exact"
                    ]
                }
            }
        },
        "routes": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/route"
            },
            "minItems": 1
        },
        "tags": {
            "description": "Field used by email-alert-api to trigger email alerts for subscriptions to topics (gov.uk/topic) and policies (gov.uk/policies).",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "additional_topics": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "browse_pages": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "policies": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "primary_topic": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "topics": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        },
        "title": {
            "type": "string"
        },
        "update_type": {
            "enum": [
                "major",
                "minor",
                "republish"
            ]
        }
    }
}