Open Presentation

Search docs

Loading documentation…
    OpenPresentation/opf
    Browse docs
    On this page
    View source

    Catalog Snapshot Manifest

    Shape of the manifest.json of the @openpresentation/gallery package (packages/gallery/catalog/manifest.json), which pins the snapshot of the default OPF catalog published by pptx.gallery. It records the gallery commit the snapshot came from and, per kind, how the snapshot relates to the published catalog plus a content hash of the bundled records. Written by scripts/sync-gallery-catalog.mjs and checked by scripts/check-spec-integrity.mjs; see docs/default-catalog.md. This schema describes a repo-internal file, not an OPF document or a catalog record; it is intentionally excluded from the package's published/typed schema surface.

    Internal catalog tooling manifest: pins the catalog source and records per-kind counts and content hashes. It is not an authoring schema for a deck or layout.

    This repository tooling schema is excluded from the published, typed authoring schema surface. Slide Layout defines layouts; Presentation defines your deck.

    Schema $id
    https://openpresentation.org/schema/opf-catalog-manifest/v1
    Type
    object
    Source
    spec/schemas/catalog-manifest.schema.json
    Fields
    5 · 5 required

    Field index

    FieldTypeReq.DefaultDescription
    $schemaconstyes—
    $schema · Allowed values
    "https://openpresentation.org/schema/opf-catalog-manifest/v1"
    descriptionstringyes—
    publisherstringyes—Base URL of the default-catalog publisher. Each kind is published at <publisher>/<kind>/index.json.
    sourceobjectyes—The published catalog files the snapshot was taken from.
    kindsobjectyes—One entry per catalog kind, keyed by the kind's URL segment.

    $schema

    typeconstrequiredyesdefault—

    $schema · Allowed values
    "https://openpresentation.org/schema/opf-catalog-manifest/v1"
    $schema.json
    {
      "$schema": "https://openpresentation.org/schema/opf-catalog-manifest/v1"
    }

    description

    typestringrequiredyesdefault—

    publisher

    typestringrequiredyesdefault—

    Base URL of the default-catalog publisher. Each kind is published at <publisher>/<kind>/index.json.

    source

    typeobjectrequiredyesdefault—

    The published catalog files the snapshot was taken from.

    kinds

    typeobjectrequiredyesdefault—

    One entry per catalog kind, keyed by the kind's URL segment.

    kinds.*.mode · Allowed values
    "mirror"
    Complete definition constraints
    Schema constraints
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "$id": "https://openpresentation.org/schema/opf-catalog-manifest/v1",
      "$comment": "The v1 in the $id is the pre-1.0 line, not a frozen contract: this schema may change in any 0.x minor release. The release that produced this copy is the version of the @openpresentation/opf package it came from (opf --version; opf schemas lists it next to each id). See docs/schema-versioning.md.",
      "title": "Catalog Snapshot Manifest",
      "description": "Shape of the `manifest.json` of the @openpresentation/gallery package (packages/gallery/catalog/manifest.json), which pins the snapshot of the default OPF catalog published by pptx.gallery. It records the gallery commit the snapshot came from and, per kind, how the snapshot relates to the published catalog plus a content hash of the bundled records. Written by scripts/sync-gallery-catalog.mjs and checked by scripts/check-spec-integrity.mjs; see docs/default-catalog.md. This schema describes a repo-internal file, not an OPF document or a catalog record; it is intentionally excluded from the package's published/typed schema surface.",
      "type": "object",
      "required": [
        "$schema",
        "description",
        "publisher",
        "source",
        "kinds"
      ],
      "additionalProperties": false,
      "properties": {
        "$schema": {
          "type": "string",
          "const": "https://openpresentation.org/schema/opf-catalog-manifest/v1"
        },
        "description": {
          "type": "string"
        },
        "publisher": {
          "type": "string",
          "description": "Base URL of the default-catalog publisher. Each kind is published at `<publisher>/<kind>/index.json`.",
          "format": "uri"
        },
        "source": {
          "type": "object",
          "description": "The published catalog files the snapshot was taken from.",
          "required": [
            "repository",
            "commit",
            "path"
          ],
          "additionalProperties": false,
          "properties": {
            "repository": {
              "type": "string",
              "description": "Git repository of the publisher.",
              "format": "uri"
            },
            "commit": {
              "type": "string",
              "description": "Full commit SHA of the publisher checkout whose published files the snapshot matches."
            },
            "path": {
              "type": "string",
              "description": "Directory in that repository holding `<kind>/index.json` and `<kind>/<id>.json`."
            }
          }
        },
        "kinds": {
          "type": "object",
          "description": "One entry per catalog kind, keyed by the kind's URL segment.",
          "additionalProperties": {
            "$ref": "#/$defs/KindEntry"
          }
        }
      },
      "$defs": {
        "KindEntry": {
          "type": "object",
          "required": [
            "mode",
            "records",
            "contentSha256",
            "gallery"
          ],
          "additionalProperties": false,
          "properties": {
            "mode": {
              "type": "string",
              "description": "Always 'mirror': the snapshot holds every record the publisher serves for the kind (OPF 0.15).",
              "enum": [
                "mirror"
              ]
            },
            "records": {
              "type": "integer",
              "description": "Number of records bundled for this kind.",
              "minimum": 0
            },
            "contentSha256": {
              "type": "string",
              "description": "contentSha256 of the bundled records, as defined by the catalog index schema.",
              "pattern": "^[0-9a-f]{64}$"
            },
            "gallery": {
              "type": "object",
              "description": "The published catalog for this kind at the pinned commit.",
              "required": [
                "records",
                "contentSha256"
              ],
              "additionalProperties": false,
              "properties": {
                "records": {
                  "type": "integer",
                  "minimum": 0
                },
                "contentSha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                }
              }
            }
          }
        }
      }
    }

    Definition choices

    Values declared by this schema and its nested definitions. Paths ending in [] describe array items; * describes each dictionary entry. Variant paths apply within the named schema branch.

    $defs.KindEntry.mode · Allowed values
    "mirror"