{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://jkolantree.github.io/astra/schemas/supplemental-release-spec-v1.schema.json",
  "title": "ASTRA namespaced supplemental release specification v1",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "identity_schema",
    "title",
    "version",
    "tag",
    "release_date",
    "build_epoch",
    "build_epoch_unix",
    "namespace",
    "parent_reference",
    "scientific_classification",
    "repository",
    "repository_id",
    "author",
    "licenses",
    "release_asset_allowlist",
    "checksum_asset_names",
    "identity_excludes_self",
    "zenodo",
    "doi",
    "pages"
  ],
  "properties": {
    "schema": {"const": "https://jkolantree.github.io/astra/schemas/supplemental-release-spec-v1.schema.json"},
    "identity_schema": {"const": "https://jkolantree.github.io/astra/schemas/supplemental-release-identity-v1.schema.json"},
    "title": {"type": "string", "minLength": 1},
    "version": {"type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+-[0-9A-Za-z.-]+$"},
    "tag": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*-v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9A-Za-z.-]+$"},
    "release_date": {"type": "string", "format": "date"},
    "build_epoch": {"type": "string", "format": "date-time"},
    "build_epoch_unix": {"type": "integer", "minimum": 0},
    "namespace": {"type": "string", "minLength": 1},
    "parent_reference": {"type": "string", "minLength": 1},
    "scientific_classification": {"type": "string", "minLength": 1},
    "repository": {"type": "string", "format": "uri", "pattern": "^https://github\\.com/"},
    "repository_id": {"type": "integer", "minimum": 1},
    "author": {"type": "string", "minLength": 1},
    "licenses": {
      "type": "object",
      "additionalProperties": {"type": "string", "minLength": 1},
      "minProperties": 1
    },
    "release_asset_allowlist": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {"type": "string", "minLength": 1}
    },
    "checksum_asset_names": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {"type": "string", "minLength": 1}
    },
    "identity_excludes_self": {"const": true},
    "zenodo": {"type": "boolean"},
    "doi": {"type": "boolean"},
    "pages": {"type": "boolean"}
  }
}
