{
    "$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"
        },
        "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."
        },
        "change_history": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "note": {
                        "description": "A summary of the change",
                        "type": "string"
                    },
                    "public_timestamp": {
                        "_format": "date-time",
                        "type": "string"
                    }
                },
                "required": [
                    "public_timestamp",
                    "note"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "description": {
            "type": "string"
        },
        "description_optional": {
            "anyOf": [
                {
                    "$ref": "#/definitions/description"
                },
                {
                    "type": "null"
                }
            ]
        },
        "details": {
            "additionalProperties": false,
            "properties": {
                "beta": {
                    "$ref": "#/definitions/finder_beta"
                },
                "beta_message": {
                    "anyOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "canonical_link": {
                    "type": "boolean"
                },
                "change_history": {
                    "$ref": "#/definitions/change_history"
                },
                "default_documents_per_page": {
                    "$ref": "#/definitions/finder_default_documents_per_page"
                },
                "default_order": {
                    "$ref": "#/definitions/finder_default_order"
                },
                "document_noun": {
                    "$ref": "#/definitions/finder_document_noun"
                },
                "facets": {
                    "$ref": "#/definitions/finder_facets"
                },
                "filter": {
                    "$ref": "#/definitions/finder_filter"
                },
                "format_name": {
                    "type": "string"
                },
                "generic_description": {
                    "type": "boolean"
                },
                "logo_path": {
                    "type": "string"
                },
                "no_index": {
                    "type": "boolean"
                },
                "reject": {
                    "$ref": "#/definitions/finder_reject_filter"
                },
                "show_summaries": {
                    "$ref": "#/definitions/finder_show_summaries"
                },
                "signup_link": {
                    "$ref": "#/definitions/finder_signup_link"
                },
                "sort": {
                    "$ref": "#/definitions/finder_sort"
                },
                "summary": {
                    "$ref": "#/definitions/finder_summary"
                }
            },
            "required": [
                "document_noun",
                "facets"
            ],
            "type": "object"
        },
        "finder_beta": {
            "anyOf": [
                {
                    "type": "boolean"
                },
                {
                    "type": "null"
                }
            ],
            "description": "Indicates if finder is in beta. TODO: Switch to top-level phase label"
        },
        "finder_default_documents_per_page": {
            "description": "Specify this to paginate results",
            "type": "integer"
        },
        "finder_default_order": {
            "description": "DEPRECATED: Use \u201csort\u201d property",
            "type": "string"
        },
        "finder_document_noun": {
            "description": "How to refer to documents when presenting the search results",
            "type": "string"
        },
        "finder_facets": {
            "description": "The facets shown to the user to refine their search.",
            "items": {
                "additionalProperties": false,
                "properties": {
                    "allowed_values": {
                        "description": "Possible values to show for non-dynamic select facets. All values are shown regardless of the search.",
                        "items": {
                            "$ref": "#/definitions/label_value_pair"
                        },
                        "type": "array"
                    },
                    "closed_value": {
                        "$ref": "#/definitions/label_value_pair",
                        "description": "Value that determines the closed state (the key field is in the past) of a topical facet."
                    },
                    "combine_mode": {
                        "default": "and",
                        "description": "Specifies how to combine with other facets",
                        "enum": [
                            "and",
                            "or"
                        ],
                        "type": "string"
                    },
                    "display_as_result_metadata": {
                        "description": "Include this in search result metadata. Can be set for non-filterable facets.",
                        "type": "boolean"
                    },
                    "filter_key": {
                        "description": "The exact rummager field name for this facet. Allows 'key' to be aliased to a rummager filter field",
                        "type": "string"
                    },
                    "filter_value": {
                        "description": "A preset filter value that is applied when a checkbox is selected",
                        "type": "string"
                    },
                    "filterable": {
                        "description": "This must be true to show the facet to users.",
                        "type": "boolean"
                    },
                    "hide_facet_tag": {
                        "description": "Causes the facet to not have a facet tag shown in a finder",
                        "type": "boolean"
                    },
                    "key": {
                        "description": "The rummager field name used for this facet.",
                        "type": "string"
                    },
                    "keys": {
                        "description": "Field names used for the taxon drop down.",
                        "items": {
                            "type": "string"
                        },
                        "type": "array"
                    },
                    "name": {
                        "description": "Label for the facet.",
                        "type": "string"
                    },
                    "open_value": {
                        "$ref": "#/definitions/label_value_pair",
                        "description": "Value that determines the open state (the key field is in the future) of a topical facet."
                    },
                    "option_lookup": {
                        "additionalProperties": true,
                        "description": "A map of keys to values that can be used to associate allowed_values with multiple values",
                        "patternProperties": {
                            "^[a-z_]+$": {
                                "items": {
                                    "type": "string"
                                },
                                "type": "array"
                            }
                        },
                        "type": "object"
                    },
                    "preposition": {
                        "description": "Text used to augment the description of the search when the facet is used.",
                        "type": "string"
                    },
                    "short_name": {
                        "type": "string"
                    },
                    "show_option_select_filter": {
                        "description": "Controls whether Option Select Facet displays a filter field",
                        "type": "boolean"
                    },
                    "type": {
                        "description": "Defines the UI component and how the facet is queried from the search API",
                        "enum": [
                            "autocomplete",
                            "checkbox",
                            "date",
                            "hidden",
                            "hidden_clearable",
                            "radio",
                            "research_and_statistics",
                            "official_documents",
                            "taxon",
                            "text",
                            "topical"
                        ],
                        "type": "string"
                    }
                },
                "required": [
                    "key",
                    "filterable",
                    "display_as_result_metadata"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "finder_filter": {
            "additionalProperties": false,
            "description": "This is the fixed filter that scopes the finder",
            "properties": {
                "all_part_of_taxonomy_tree": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "content_purpose_subgroup": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "content_purpose_supergroup": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "content_store_document_type": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "document_type": {
                    "type": "string"
                },
                "email_document_supertype": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "facet_groups": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "format": {
                    "type": "string"
                },
                "has_official_document": {
                    "type": "boolean"
                },
                "organisations": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "policies": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                }
            },
            "type": "object"
        },
        "finder_reject_filter": {
            "additionalProperties": false,
            "description": "A fixed filter that rejects documents which match the conditions",
            "properties": {
                "content_purpose_supergroup": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "content_store_document_type": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "email_document_supertype": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "link": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "policies": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                }
            },
            "type": "object"
        },
        "finder_show_summaries": {
            "type": "boolean"
        },
        "finder_signup_link": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ]
        },
        "finder_sort": {
            "description": "These are the options for sorting the finder",
            "items": {
                "additionalProperties": false,
                "properties": {
                    "default": {
                        "description": "Indicates if this should be the default sort option",
                        "type": "boolean"
                    },
                    "key": {
                        "description": "Rummager field name, with an optional preceding \u201c-\u201d to sort in descending order",
                        "type": "string"
                    },
                    "name": {
                        "description": "Label for the sort option",
                        "type": "string"
                    }
                },
                "required": [
                    "key",
                    "name"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "finder_summary": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ]
        },
        "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"
        },
        "frontend_links": {
            "items": {
                "additionalProperties": true,
                "properties": {
                    "analytics_identifier": {
                        "$ref": "#/definitions/analytics_identifier"
                    },
                    "api_path": {
                        "$ref": "#/definitions/absolute_path"
                    },
                    "api_url": {
                        "_format": "uri",
                        "description": "DEPRECATED: api_path should be used instead of api_url. This is due to values of api_url being tied to an environment which can cause problems when data is synced between environments. In time this field will be removed by the Publishing Platform team.",
                        "type": "string"
                    },
                    "base_path": {
                        "$ref": "#/definitions/absolute_path"
                    },
                    "content_id": {
                        "$ref": "#/definitions/guid"
                    },
                    "document_type": {
                        "type": "string"
                    },
                    "links": {
                        "patternProperties": {
                            "^[a-z_]+$": {
                                "$ref": "#/definitions/frontend_links"
                            }
                        },
                        "type": "object"
                    },
                    "locale": {
                        "$ref": "#/definitions/locale"
                    },
                    "public_updated_at": {
                        "oneOf": [
                            {
                                "$ref": "#/definitions/public_updated_at"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "schema_name": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "web_url": {
                        "_format": "uri",
                        "description": "DEPRECATED: base_path should be used instead of web_url. This is due to values of web_url being tied to an environment which can cause problems when data is synced between environments. In time this field will be removed by the Publishing Platform team.",
                        "type": "string"
                    }
                },
                "required": [
                    "content_id",
                    "locale",
                    "title"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "frontend_links_with_base_path": {
            "items": {
                "additionalProperties": true,
                "properties": {
                    "analytics_identifier": {
                        "$ref": "#/definitions/analytics_identifier"
                    },
                    "api_path": {
                        "$ref": "#/definitions/absolute_path"
                    },
                    "api_url": {
                        "_format": "uri",
                        "description": "DEPRECATED: api_path should be used instead of api_url. This is due to values of api_url being tied to an environment which can cause problems when data is synced between environments. In time this field will be removed by the Publishing Platform team.",
                        "type": "string"
                    },
                    "base_path": {
                        "$ref": "#/definitions/absolute_path"
                    },
                    "content_id": {
                        "$ref": "#/definitions/guid"
                    },
                    "document_type": {
                        "type": "string"
                    },
                    "links": {
                        "patternProperties": {
                            "^[a-z_]+$": {
                                "$ref": "#/definitions/frontend_links_with_base_path"
                            }
                        },
                        "type": "object"
                    },
                    "locale": {
                        "$ref": "#/definitions/locale"
                    },
                    "public_updated_at": {
                        "oneOf": [
                            {
                                "$ref": "#/definitions/public_updated_at"
                            },
                            {
                                "type": "null"
                            }
                        ]
                    },
                    "schema_name": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    },
                    "web_url": {
                        "_format": "uri",
                        "description": "DEPRECATED: base_path should be used instead of web_url. This is due to values of web_url being tied to an environment which can cause problems when data is synced between environments. In time this field will be removed by the Publishing Platform team.",
                        "type": "string"
                    }
                },
                "required": [
                    "base_path",
                    "content_id",
                    "locale",
                    "title"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "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"
        },
        "label_value_pair": {
            "additionalProperties": false,
            "description": "One of many possible values a user can select from",
            "properties": {
                "default": {
                    "description": "The default option for a radio facet",
                    "type": "boolean"
                },
                "label": {
                    "description": "A human readable label",
                    "type": "string"
                },
                "value": {
                    "description": "A value to use for form controls",
                    "type": "string"
                }
            },
            "required": [
                "label",
                "value"
            ],
            "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"
        },
        "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"
                }
            ]
        },
        "publishing_scheduled_at": {
            "_format": "date-time",
            "description": "When this content was last scheduled for publishing. Determined by the publishing intent sent by the publishing API.",
            "type": "string"
        },
        "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"
        },
        "scheduled_publishing_delay_seconds": {
            "description": "The delay between the most recent scheduled and actual publishing times. Determined by the content store based on the publishing intent.",
            "type": "integer"
        },
        "title": {
            "type": "string"
        },
        "withdrawn_notice": {
            "additionalProperties": false,
            "properties": {
                "explanation": {
                    "type": "string"
                },
                "withdrawn_at": {
                    "format": "date-time"
                }
            },
            "type": "object"
        }
    },
    "properties": {
        "analytics_identifier": {
            "$ref": "#/definitions/analytics_identifier"
        },
        "base_path": {
            "$ref": "#/definitions/absolute_path"
        },
        "content_id": {
            "$ref": "#/definitions/guid"
        },
        "description": {
            "$ref": "#/definitions/description_optional"
        },
        "details": {
            "$ref": "#/definitions/details"
        },
        "document_type": {
            "enum": [
                "finder",
                "search"
            ],
            "type": "string"
        },
        "first_published_at": {
            "anyOf": [
                {
                    "$ref": "#/definitions/first_published_at"
                },
                {
                    "type": "null"
                }
            ]
        },
        "links": {
            "additionalProperties": false,
            "properties": {
                "available_translations": {
                    "$ref": "#/definitions/frontend_links_with_base_path"
                },
                "child_taxons": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Link type automatically added by Publishing API"
                },
                "children": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Link type automatically added by Publishing API"
                },
                "document_collections": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Link type automatically added by Publishing API"
                },
                "email_alert_signup": {
                    "$ref": "#/definitions/frontend_links_with_base_path"
                },
                "facet_group": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "The facet_group this finder uses to define available filters.",
                    "maxItems": 1
                },
                "facet_groups": {
                    "$ref": "#/definitions/frontend_links",
                    "description": "Prototype-stage metadata tagging tree roots for this content item. A content item my belong to many facet groups without having any specific facet_values links."
                },
                "facet_values": {
                    "$ref": "#/definitions/frontend_links",
                    "description": "Prototype-stage metadata tagging values for this content item, a content item can be linked to many facet values from varying facet groups."
                },
                "finder": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Powers links from content back to finders the content is surfaced on"
                },
                "lead_organisations": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "DEPRECATED: A subset of organisations that should be emphasised in relation to this content item. All organisations specified here should also be part of the organisations array."
                },
                "level_one_taxons": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Link type automatically added by Publishing API"
                },
                "mainstream_browse_pages": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Powers the /browse section of the site. These are known as sections in some legacy apps."
                },
                "meets_user_needs": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "The user needs this piece of content meets."
                },
                "ministers": {
                    "$ref": "#/definitions/frontend_links",
                    "description": "Link type automatically added by Publishing API"
                },
                "ordered_related_items": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Related items, can be any page on GOV.UK. Mostly used for mainstream content to power the sidebar. Ordering of the links is determined by the editor in Content Tagger."
                },
                "ordered_related_items_overrides": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Related items, can be any page on GOV.UK. Overrides 'more like this' automatically generated links in the beta navigation."
                },
                "organisations": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "All organisations linked to this content item. This should include lead organisations."
                },
                "original_primary_publishing_organisation": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "The organisation that published the original version of the page. Corresponds to the first of the 'Lead organisations' in Whitehall for the first edition, and is empty for all other publishing applications."
                },
                "parent": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "The parent content item.",
                    "maxItems": 1
                },
                "part_of_step_navs": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Link type automatically added by Publishing API"
                },
                "policies": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Link type automatically added by Publishing API"
                },
                "policy_areas": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "A largely deprecated tag currently only used to power email alerts."
                },
                "primary_publishing_organisation": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "The organisation that published the page. Corresponds to the first of the 'Lead organisations' in Whitehall, and is empty for all other publishing applications.",
                    "maxItems": 1
                },
                "related": {
                    "$ref": "#/definitions/frontend_links_with_base_path"
                },
                "related_to_step_navs": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Link type automatically added by Publishing API"
                },
                "role_appointments": {
                    "$ref": "#/definitions/frontend_links",
                    "description": "Link type automatically added by Publishing API"
                },
                "secondary_to_step_navs": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Link type automatically added by Publishing API"
                },
                "suggested_ordered_related_items": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "New A/B test suggestions for related items. Used for displaying related content on most pages, except for step-by-step and fatality notices. Links and their ordering are determined by the machine learning algorithms included in this A/B test."
                },
                "taxons": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Prototype-stage taxonomy label for this content item"
                },
                "topic_taxonomy_taxons": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Link type automatically added by Publishing API"
                },
                "topics": {
                    "$ref": "#/definitions/frontend_links_with_base_path",
                    "description": "Powers the /topic section of the site. These are known as specialist sectors in some legacy apps."
                }
            },
            "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"
        },
        "public_updated_at": {
            "anyOf": [
                {
                    "$ref": "#/definitions/public_updated_at"
                },
                {
                    "type": "null"
                }
            ]
        },
        "publishing_app": {
            "$ref": "#/definitions/publishing_app_name"
        },
        "publishing_request_id": {
            "$ref": "#/definitions/publishing_request_id"
        },
        "publishing_scheduled_at": {
            "anyOf": [
                {
                    "$ref": "#/definitions/publishing_scheduled_at"
                },
                {
                    "type": "null"
                }
            ]
        },
        "rendering_app": {
            "$ref": "#/definitions/rendering_app"
        },
        "scheduled_publishing_delay_seconds": {
            "anyOf": [
                {
                    "$ref": "#/definitions/scheduled_publishing_delay_seconds"
                },
                {
                    "type": "null"
                }
            ]
        },
        "schema_name": {
            "enum": [
                "finder"
            ],
            "type": "string"
        },
        "title": {
            "$ref": "#/definitions/title"
        },
        "updated_at": {
            "_format": "date-time",
            "type": "string"
        },
        "withdrawn_notice": {
            "$ref": "#/definitions/withdrawn_notice"
        }
    },
    "required": [
        "base_path",
        "content_id",
        "description",
        "details",
        "document_type",
        "links",
        "locale",
        "public_updated_at",
        "schema_name",
        "title",
        "updated_at"
    ],
    "type": "object"
}