{
  "$id": "https://opendatafabric.org/schemas/datasets/v1alpha1/DatasetSpec",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Represents a desired state of the dataset metadata.",
  "type": "object",
  "required": [
    "did",
    "kind",
    "metadata",
    "volume"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "dataset-id",
      "description": "DID of the dataset in global ODF network"
    },
    "kind": {
      "$ref": "https://opendatafabric.org/schemas/datasets/v1alpha1/DatasetKind",
      "description": "Type of the dataset.",
      "unevaluatedProperties": false
    },
    "metadata": {
      "type": "array",
      "items": {
        "$ref": "https://opendatafabric.org/schemas/datasets/v1alpha1/MetadataEvent",
        "unevaluatedProperties": false
      },
      "description": "An array of metadata events that will be used to populate the chain, e.g. to set info, licenses, and attachments. As the dataset evolves, it maintains a snapshot of the key events that describe the dataset in its latest state, excluding intermediate transitions (e.g. previous schema changes) and events related to ingestions and transformations."
    },
    "volume": {
      "$ref": "https://opendatafabric.org/schemas/resources/v1alpha1/ResourceHandle",
      "description": "Reference to a storage volume where dataset data will be stored. If omitted, the node's default storage is used.",
      "unevaluatedProperties": false
    }
  }
}
