{
  "$defs": {
    "ArtifactCategory": {
      "enum": [
        "artifacts",
        "reports",
        "plots",
        "logs"
      ],
      "title": "ArtifactCategory",
      "type": "string"
    },
    "ArtifactIndexEntry": {
      "additionalProperties": false,
      "properties": {
        "category": {
          "$ref": "#/$defs/ArtifactCategory"
        },
        "producer_result_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Producer Result Id"
        },
        "reference": {
          "$ref": "#/$defs/ArtifactReference"
        },
        "schema_id": {
          "anyOf": [
            {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Schema Id"
        }
      },
      "required": [
        "reference",
        "category"
      ],
      "title": "ArtifactIndexEntry",
      "type": "object"
    },
    "ArtifactReference": {
      "additionalProperties": false,
      "properties": {
        "artifact_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Artifact Id",
          "type": "string"
        },
        "media_type": {
          "maxLength": 128,
          "minLength": 3,
          "title": "Media Type",
          "type": "string"
        },
        "relative_path": {
          "maxLength": 512,
          "minLength": 1,
          "title": "Relative Path",
          "type": "string"
        },
        "sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Sha256",
          "type": "string"
        },
        "size_bytes": {
          "minimum": 0,
          "title": "Size Bytes",
          "type": "integer"
        }
      },
      "required": [
        "artifact_id",
        "media_type",
        "relative_path",
        "sha256",
        "size_bytes"
      ],
      "title": "ArtifactReference",
      "type": "object"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:artifact-index",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "contract_suite": {
      "const": "sindri.contracts",
      "default": "sindri.contracts",
      "title": "Contract Suite",
      "type": "string"
    },
    "contract_version": {
      "const": "1.0.0",
      "default": "1.0.0",
      "title": "Contract Version",
      "type": "string"
    },
    "entries": {
      "default": [],
      "items": {
        "$ref": "#/$defs/ArtifactIndexEntry"
      },
      "title": "Entries",
      "type": "array"
    },
    "schema_kind": {
      "const": "artifact_index",
      "default": "artifact_index",
      "title": "Schema Kind",
      "type": "string"
    }
  },
  "title": "ArtifactIndex",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
