{
  "$comment": "Generated from the Site Pipeline Pydantic models. Do not edit by hand; regenerate with `make schemas`.",
  "$defs": {
    "ProviderAsset": {
      "additionalProperties": false,
      "description": "Downloadable asset attached to one provider release or candidate record.",
      "properties": {
        "checksums": {
          "anyOf": [
            {
              "additionalProperties": {
                "minLength": 1,
                "type": "string"
              },
              "propertyNames": {
                "minLength": 1
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Checksum values keyed by algorithm name, such as `sha512` or `sha256`.",
          "title": "Checksums"
        },
        "kind": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Short asset kind label, for example `binary`, `source`, `signature`, or `sbom`.",
          "examples": [
            "binary"
          ],
          "title": "Kind"
        },
        "mediaType": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Declared media type for the asset payload when the provider exposes it.",
          "examples": [
            "application/gzip"
          ],
          "title": "Mediatype"
        },
        "name": {
          "description": "Filename or display label of the downloadable asset.",
          "examples": [
            "spark-4.0.0-bin.tgz"
          ],
          "minLength": 1,
          "title": "Name",
          "type": "string"
        },
        "provenanceUrl": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "URL of provenance or attestation metadata associated with this asset, if available.",
          "title": "Provenanceurl"
        },
        "sbomUrl": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "URL of the asset's software bill of materials, if available.",
          "title": "Sbomurl"
        },
        "signatureUrl": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "URL of the detached signature file, if available.",
          "title": "Signatureurl"
        },
        "size": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Asset size in bytes when the provider exposes it.",
          "examples": [
            125004321
          ],
          "title": "Size"
        },
        "url": {
          "description": "Canonical download URL for the asset.",
          "examples": [
            "https://downloads.example.org/spark-4.0.0-bin.tgz"
          ],
          "minLength": 1,
          "title": "Url",
          "type": "string"
        }
      },
      "required": [
        "name",
        "url"
      ],
      "title": "ProviderAsset",
      "type": "object",
      "x-buildish-contract": {
        "category": "provider",
        "ownership": "provider-derived"
      }
    },
    "ProviderDescriptor": {
      "additionalProperties": false,
      "description": "Metadata about one provider that contributed records to the snapshot.",
      "properties": {
        "baseUrl": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Base URL for the provider service when records can link back to a human-browsable origin.",
          "examples": [
            "https://github.com/apache"
          ],
          "title": "Baseurl"
        },
        "displayName": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Human-readable provider label shown in diagnostics or rendered metadata.",
          "examples": [
            "GitHub Releases"
          ],
          "title": "Displayname"
        },
        "fetchedAt": {
          "description": "Timestamp when this provider snapshot section was fetched or refreshed.",
          "examples": [
            "2026-04-03T18:00:00Z"
          ],
          "format": "date-time",
          "title": "Fetchedat",
          "type": "string"
        },
        "key": {
          "description": "Stable provider identifier referenced by every record emitted from this provider.",
          "examples": [
            "github-releases"
          ],
          "minLength": 1,
          "title": "Key",
          "type": "string"
        },
        "type": {
          "description": "Provider implementation type, such as `github`, `git`, or another fetcher-specific backend name.",
          "examples": [
            "github"
          ],
          "minLength": 1,
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "key",
        "type",
        "fetchedAt"
      ],
      "title": "ProviderDescriptor",
      "type": "object",
      "x-buildish-contract": {
        "category": "provider",
        "ownership": "provider-derived"
      }
    },
    "ProviderRecord": {
      "additionalProperties": false,
      "description": "Normalized provider fact about one release, candidate, or ref context.",
      "properties": {
        "artifactKey": {
          "description": "Artifact key that this provider record belongs to.",
          "examples": [
            "runtime"
          ],
          "minLength": 1,
          "title": "Artifactkey",
          "type": "string"
        },
        "assets": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/ProviderAsset"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Downloadable assets attached to the record, including checksums and related provenance links when available.",
          "title": "Assets"
        },
        "candidateSequence": {
          "anyOf": [
            {
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Numeric ordering hint for release candidates, usually the `rc` sequence number.",
          "examples": [
            1
          ],
          "title": "Candidatesequence"
        },
        "commitSha": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Resolved commit SHA for the record when the provider exposes it.",
          "examples": [
            "6f0fd1f7b2c4a6d8e9f00123456789abcdef0123"
          ],
          "title": "Commitsha"
        },
        "componentSlug": {
          "description": "Component slug that this provider record belongs to.",
          "examples": [
            "spark"
          ],
          "minLength": 1,
          "title": "Componentslug",
          "type": "string"
        },
        "createdAt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Timestamp when the upstream record was first created.",
          "title": "Createdat"
        },
        "displayVersion": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Human-readable version label when the raw version string needs a friendlier presentation.",
          "examples": [
            "4.0.0 GA"
          ],
          "title": "Displayversion"
        },
        "externalId": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Provider-specific stable identifier used to deduplicate and revisit the same upstream record.",
          "examples": [
            "github:release:runtime-4.0.0"
          ],
          "title": "Externalid"
        },
        "externalUrl": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Human-browsable upstream URL for the release, tag, or ref record.",
          "title": "Externalurl"
        },
        "kind": {
          "$ref": "#/$defs/RecordKind",
          "description": "Record kind, such as exact release, release candidate, development ref, line head, or named ref."
        },
        "maturity": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Maturity label such as preview, beta, or stable that readers can use to judge readiness.",
          "examples": [
            "stable"
          ],
          "title": "Maturity"
        },
        "namedRefKey": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Catalog-authored named-ref key that this provider record enriches when the record represents a named ref.",
          "examples": [
            "preview"
          ],
          "title": "Namedrefkey"
        },
        "provider": {
          "description": "Provider key that identifies which fetched provider emitted this record.",
          "examples": [
            "github-releases"
          ],
          "minLength": 1,
          "title": "Provider",
          "type": "string"
        },
        "publicationState": {
          "anyOf": [
            {
              "$ref": "#/$defs/PublicationState"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Publication state for the record, such as published, withdrawn, or tombstoned."
        },
        "publishedAt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Timestamp when the upstream record became publicly available.",
          "title": "Publishedat"
        },
        "ref": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Exact source-control ref associated with this record, especially for development, line-head, or named-ref contexts.",
          "examples": [
            "refs/heads/main"
          ],
          "title": "Ref"
        },
        "releaseLine": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Release-line key that groups this record with related versions such as `4.0`.",
          "examples": [
            "4.0"
          ],
          "title": "Releaseline"
        },
        "releaseLineAncestors": {
          "anyOf": [
            {
              "items": {
                "minLength": 1,
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Ancestor release-line keys, ordered from nearest to farthest, used when lineage matters to selection or rendering.",
          "examples": [
            [
              "4.x",
              "stable"
            ]
          ],
          "title": "Releaselineancestors"
        },
        "sourceKey": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optional source binding key when the provider record came from one named catalog source.",
          "examples": [
            "apache-spark"
          ],
          "title": "Sourcekey"
        },
        "supportStatus": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Support-status key or label associated with this record.",
          "examples": [
            "supported"
          ],
          "title": "Supportstatus"
        },
        "tag": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Exact provider tag associated with this record when tags are available.",
          "examples": [
            "v4.0.0"
          ],
          "title": "Tag"
        },
        "updatedAt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Timestamp of the most recent upstream update observed for this record.",
          "title": "Updatedat"
        },
        "urls": {
          "anyOf": [
            {
              "additionalProperties": {
                "minLength": 1,
                "type": "string"
              },
              "propertyNames": {
                "minLength": 1
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Additional named URLs related to the record, such as notes, signatures, vote threads, or changelogs.",
          "title": "Urls"
        },
        "version": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Exact version string for release and candidate records when the provider exposes one.",
          "examples": [
            "4.0.0"
          ],
          "title": "Version"
        },
        "voteStatus": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Vote status label for a candidate release when the provider exposes release-vote state.",
          "examples": [
            "passed"
          ],
          "title": "Votestatus"
        }
      },
      "required": [
        "provider",
        "kind",
        "componentSlug",
        "artifactKey"
      ],
      "title": "ProviderRecord",
      "type": "object",
      "x-buildish-contract": {
        "category": "provider",
        "ownership": "provider-derived"
      }
    },
    "PublicationState": {
      "description": "Observed provider-side publication state.",
      "enum": [
        "published",
        "hidden",
        "withdrawn",
        "tombstoned"
      ],
      "title": "PublicationState",
      "type": "string"
    },
    "RecordKind": {
      "description": "Normalized provider record lifecycle kind.",
      "enum": [
        "development",
        "released",
        "candidate",
        "namedRef",
        "lineHead"
      ],
      "title": "RecordKind",
      "type": "string"
    }
  },
  "$id": "https://buildish.org/components/site-pipeline/schemas/provider-snapshot-v1.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Provider-derived normalized snapshot from ``site/provider-snapshot.json``.",
  "examples": [
    {
      "providers": [
        {
          "baseUrl": "https://github.com/apache/spark",
          "displayName": "GitHub Releases",
          "fetchedAt": "2026-04-03T18:00:00Z",
          "key": "github-releases",
          "type": "github"
        }
      ],
      "records": [
        {
          "artifactKey": "runtime",
          "assets": [
            {
              "checksums": {
                "sha256": "abc123"
              },
              "name": "spark-4.0.0-src.tgz",
              "url": "https://downloads.apache.org/spark/spark-4.0.0-src.tgz"
            }
          ],
          "componentSlug": "spark",
          "externalId": "spark-4.0.0",
          "externalUrl": "https://github.com/apache/spark/releases/tag/v4.0.0",
          "kind": "released",
          "provider": "github-releases",
          "publishedAt": "2026-04-03T18:00:00Z",
          "version": "4.0.0"
        }
      ],
      "schemaVersion": 1
    }
  ],
  "properties": {
    "providers": {
      "description": "Provider descriptors for every provider that contributed records to this snapshot.",
      "items": {
        "$ref": "#/$defs/ProviderDescriptor"
      },
      "title": "Providers",
      "type": "array"
    },
    "records": {
      "description": "Normalized provider records for releases, candidates, tags, refs, and related downloadable assets.",
      "items": {
        "$ref": "#/$defs/ProviderRecord"
      },
      "title": "Records",
      "type": "array"
    },
    "schemaVersion": {
      "const": 1,
      "description": "Schema version for the provider snapshot document.",
      "title": "Schemaversion",
      "type": "integer"
    }
  },
  "required": [
    "schemaVersion",
    "providers",
    "records"
  ],
  "title": "Site Pipeline Provider Snapshot v1",
  "type": "object",
  "x-buildish-contract": {
    "category": "provider",
    "filePath": "site/provider-snapshot.json",
    "ownership": "provider-derived",
    "summary": "Normalized provider inventory of releases, candidates, refs, and downloadable assets."
  }
}
