{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zoomin/json-schema/zoomin-bundle-schema.json",
  "title": "Bundle",
  "description": "An uploaded bundle",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zoomin-openapi.yml#/components/schemas/Bundle",
  "required": [
    "attachments",
    "dates",
    "es_archived_content",
    "homepage",
    "labels",
    "language",
    "metadata",
    "name",
    "title",
    "type"
  ],
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The identifier of this bundle",
      "format": "bundle-name"
    },
    "title": {
      "type": "string",
      "description": "The title of the publication in the language of this bundle"
    },
    "subtitle": {
      "type": "string",
      "description": "The publication subtitle in the language of this bundle"
    },
    "shortDescription": {
      "type": "string",
      "description": "The short description of the publication in the language of this bundle"
    },
    "clustering_title": {
      "type": "string",
      "description": "A common title for all bundles that are grouped together with this one, when clustering is in use."
    },
    "type": {
      "type": "string",
      "description": "The content type of the topics in the bundle. The available content types are:\n\nHTMLBundle: HTML content. The content was provided as HTML or was converted to HTML by the upload plugin\n\nResourceBundle: Non-HTML content, such as PDF, Microsoft Word, etc.",
      "enum": [
        "HTMLBundle",
        "ResourceBundle"
      ]
    },
    "dates": {
      "$ref": "#/$defs/Dates"
    },
    "attachments": {
      "$ref": "#/$defs/Bundle_attachments"
    },
    "preprocessed_PDF": {
      "type": "string",
      "description": "A link for downloading the pre-processed PDF version of this bundle, if it exists.",
      "format": "url"
    },
    "metadata": {
      "type": "array",
      "description": "Metadata key-value pairs specified for this bundle. Metadata for individual topics within the bundle is not included.",
      "items": {
        "type": "array",
        "description": "A two-value array of a metadata key and value.",
        "items": {
          "type": "string"
        }
      }
    },
    "labels": {
      "type": "array",
      "description": "The global labels applied to this bundle in the classification map.",
      "items": {
        "$ref": "#/$defs/Label"
      }
    },
    "homepage": {
      "type": "string",
      "description": "A link to the homepage topic of the bundle, if the bundle specifies a homepage topic.",
      "format": "url"
    },
    "canonical_bundle": {
      "type": "string",
      "description": "The bundle specified as the canonical bundle for this bundle",
      "format": "bundle-name"
    },
    "language": {
      "type": "string",
      "description": "The language of this bundle",
      "format": "language"
    },
    "landing_page": {
      "type": "string",
      "description": "The path to a topic in the bundle that can be used as a landing page for the bundle. It is the homepage topic if that is specified in the bundle, or the first topic in the TOC. This field is omitted if there are no topics in the bundle.",
      "format": "url"
    },
    "follower_bundles": {
      "type": "array",
      "description": "The other bundles that are grouped together with this one, when clustering is in use.",
      "items": {
        "$ref": "#/$defs/Bundle"
      }
    },
    "es_archived_content": {
      "type": "boolean",
      "description": "Whether this bundle is archived"
    },
    "explanation": {
      "type": "object",
      "description": "The Elasticsearch explanation JSON of the search result that produced this bundle. See the [Elasticsearch Explain API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html) documentation for more information."
    }
  },
  "$defs": {
    "Attachment": {
      "title": "Attachment",
      "required": [
        "filename",
        "url"
      ],
      "type": "object",
      "properties": {
        "filename": {
          "type": "string",
          "description": "The file name of the attachment."
        },
        "url": {
          "type": "string",
          "description": "A link to download the attachment.",
          "format": "url"
        }
      },
      "description": "A file that is attached to a bundle or topic."
    },
    "Bundle": {
      "title": "Bundle",
      "required": [
        "attachments",
        "dates",
        "es_archived_content",
        "homepage",
        "labels",
        "language",
        "metadata",
        "name",
        "title",
        "type"
      ],
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The identifier of this bundle",
          "format": "bundle-name"
        },
        "title": {
          "type": "string",
          "description": "The title of the publication in the language of this bundle"
        },
        "subtitle": {
          "type": "string",
          "description": "The publication subtitle in the language of this bundle"
        },
        "shortDescription": {
          "type": "string",
          "description": "The short description of the publication in the language of this bundle"
        },
        "clustering_title": {
          "type": "string",
          "description": "A common title for all bundles that are grouped together with this one, when clustering is in use."
        },
        "type": {
          "type": "string",
          "description": "The content type of the topics in the bundle. The available content types are:\n\nHTMLBundle: HTML content. The content was provided as HTML or was converted to HTML by the upload plugin\n\nResourceBundle: Non-HTML content, such as PDF, Microsoft Word, etc.",
          "enum": [
            "HTMLBundle",
            "ResourceBundle"
          ]
        },
        "dates": {
          "$ref": "#/$defs/Dates"
        },
        "attachments": {
          "$ref": "#/$defs/Bundle_attachments"
        },
        "preprocessed_PDF": {
          "type": "string",
          "description": "A link for downloading the pre-processed PDF version of this bundle, if it exists.",
          "format": "url"
        },
        "metadata": {
          "type": "array",
          "description": "Metadata key-value pairs specified for this bundle. Metadata for individual topics within the bundle is not included.",
          "items": {
            "type": "array",
            "description": "A two-value array of a metadata key and value.",
            "items": {
              "type": "string"
            }
          }
        },
        "labels": {
          "type": "array",
          "description": "The global labels applied to this bundle in the classification map.",
          "items": {
            "$ref": "#/$defs/Label"
          }
        },
        "homepage": {
          "type": "string",
          "description": "A link to the homepage topic of the bundle, if the bundle specifies a homepage topic.",
          "format": "url"
        },
        "canonical_bundle": {
          "type": "string",
          "description": "The bundle specified as the canonical bundle for this bundle",
          "format": "bundle-name"
        },
        "language": {
          "type": "string",
          "description": "The language of this bundle",
          "format": "language"
        },
        "landing_page": {
          "type": "string",
          "description": "The path to a topic in the bundle that can be used as a landing page for the bundle. It is the homepage topic if that is specified in the bundle, or the first topic in the TOC. This field is omitted if there are no topics in the bundle.",
          "format": "url"
        },
        "follower_bundles": {
          "type": "array",
          "description": "The other bundles that are grouped together with this one, when clustering is in use.",
          "items": {
            "$ref": "#/$defs/Bundle"
          }
        },
        "es_archived_content": {
          "type": "boolean",
          "description": "Whether this bundle is archived"
        },
        "explanation": {
          "type": "object",
          "description": "The Elasticsearch explanation JSON of the search result that produced this bundle. See the [Elasticsearch Explain API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html) documentation for more information."
        }
      },
      "description": "An uploaded bundle"
    },
    "Bundle_attachments": {
      "type": "object",
      "properties": {
        "bundle_attachments": {
          "type": "array",
          "description": "Links for downloading each of the individual attachments to the bundle",
          "items": {
            "$ref": "#/$defs/Attachment"
          }
        },
        "all_attachments": {
          "type": "string",
          "description": "A link for downloading all of the attachments to the bundle in a single zip file"
        }
      },
      "description": "Links for downloading the attachments to the bundle. Attachments to individual topics within the bundle are not included."
    },
    "Dates": {
      "title": "Dates",
      "required": [
        "Added on",
        "Initial upload"
      ],
      "type": "object",
      "properties": {
        "Created on": {
          "type": "string",
          "description": "The date when the content was created. Provided by the authoring tool or upload plug-in.",
          "format": "date-time"
        },
        "Initial upload": {
          "type": "string",
          "description": "The date when the content was first uploaded. This is automatically added by Zoomin.",
          "format": "date-time"
        },
        "Updated on": {
          "type": "string",
          "description": "The date when the content was last updated. Provided by the authoring tool or upload plug-in.",
          "format": "date-time"
        },
        "Added on": {
          "type": "string",
          "description": "The date when the content was last uploaded. This is automatically added by Zoomin.",
          "format": "date-time"
        }
      },
      "description": "The dates associated with a bundle or topic. All dates are in the UTC time zone."
    },
    "Label": {
      "title": "Taxonomy label",
      "required": [
        "aliases",
        "hidden",
        "key",
        "navtitle",
        "outputclasses",
        "visibility"
      ],
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The primary identifier of this label",
          "format": "label-id"
        },
        "aliases": {
          "type": "array",
          "description": "Additional identifiers for this label",
          "items": {
            "type": "string",
            "format": "label-id"
          }
        },
        "navtitle": {
          "type": "string",
          "description": "Human readable name of the label in the default language"
        },
        "subjectHeadId": {
          "type": "string",
          "description": "The label-id of the top-level label in the subject scheme that contains this label. If this facet is itself at the top level, this field is `null`.",
          "format": "label-id"
        },
        "subjectheadNavtitle": {
          "type": "string",
          "description": "Human readable name of the top-level label in the subject scheme that contains this label. If this facet is itself at the top level, this field is `null`."
        },
        "hidden": {
          "type": "boolean",
          "description": "Whether this label should be hidden from end users in the search UI"
        },
        "outputclasses": {
          "type": "array",
          "description": "Custom HTML output classes that are applied to this label in the search UI. Does not include built-in output classes that enable Zoomin features.",
          "items": {
            "type": "string"
          }
        },
        "visibility": {
          "title": "Label UI visibility property",
          "type": "string",
          "description": "Indicates the parts of the UI that have been selected in the subject scheme for the label to be visible. Deprecated - use output classes instead.",
          "deprecated": true,
          "enum": [
            "hide-facet",
            "advanced-search",
            "refine-search",
            "show-facet"
          ]
        },
        "isSubjectHead": {
          "type": "boolean",
          "description": "Whether this label is at the top level in the subject scheme"
        }
      },
      "description": "A taxonomy label from the subject scheme. Used to classify content in classification maps for use in search and to assign content permissions in CRGs."
    }
  }
}