{
  "$defs": {
    "ExplorerSectionRef": {
      "additionalProperties": true,
      "properties": {
        "message_plain": {
          "anyOf": [
            {
              "maxLength": 500,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Message Plain"
        },
        "reason": {
          "anyOf": [
            {
              "enum": [
                "not_applicable",
                "insufficient_data",
                "needs_option"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Why a skipped section was skipped (absent in indexes written before the scientific sections: readers then list every section)",
          "title": "Reason"
        },
        "section": {
          "maxLength": 32,
          "title": "Section",
          "type": "string"
        },
        "status": {
          "default": "ok",
          "enum": [
            "ok",
            "skipped",
            "error"
          ],
          "title": "Status",
          "type": "string"
        },
        "view": {
          "description": "ui/explore/<section>.json",
          "maxLength": 256,
          "title": "View",
          "type": "string"
        }
      },
      "required": [
        "section",
        "view"
      ],
      "title": "ExplorerSectionRef",
      "type": "object"
    }
  },
  "$id": "https://schemas.mapi.dev/v1/api-ExplorerIndex.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": true,
  "description": "``ui/explore/index.json``: what an explore run produced (and why a section is\nmissing).",
  "examples": [
    {
      "ref": "dataset://growth/weekly_sales@v4",
      "sections": [
        {
          "section": "stationarity",
          "view": "ui/explore/stationarity.json"
        },
        {
          "message_plain": "Less than two seasons of data.",
          "reason": "insufficient_data",
          "section": "stl",
          "status": "skipped",
          "view": "ui/explore/stl.json"
        }
      ],
      "target": "dataset"
    },
    {
      "order": [
        "overview",
        "structure",
        "images",
        "quality",
        "distributions",
        "timeseries",
        "missingness"
      ],
      "ref": "dataset://seismology/oklahoma_quakes@v1",
      "sections": [
        {
          "section": "overview",
          "view": "ui/explore/overview.json"
        },
        {
          "section": "structure",
          "view": "ui/explore/structure.json"
        },
        {
          "section": "images",
          "view": "ui/explore/images.json"
        },
        {
          "message_plain": "Not available: the data has no polygons.",
          "reason": "not_applicable",
          "section": "map",
          "status": "skipped",
          "view": "ui/explore/map.json"
        }
      ],
      "shapes": [
        "image",
        "timeseries"
      ],
      "target": "dataset"
    }
  ],
  "properties": {
    "format": {
      "const": "mapi.explorer-index/v1",
      "default": "mapi.explorer-index/v1",
      "title": "Format",
      "type": "string"
    },
    "node": {
      "anyOf": [
        {
          "pattern": "^/(?:[A-Za-z_][A-Za-z0-9_.\\-]{0,63}(?:/[A-Za-z_][A-Za-z0-9_.\\-]{0,63}){0,7})?$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "M4: the node of a tree dataset explored (absent for a flat dataset)",
      "title": "Node"
    },
    "order": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Data Explorer: the sections in order of relevance for this data",
      "title": "Order"
    },
    "ref": {
      "description": "dataset://\u2026 or model://\u2026",
      "maxLength": 512,
      "title": "Ref",
      "type": "string"
    },
    "sections": {
      "items": {
        "$ref": "#/$defs/ExplorerSectionRef"
      },
      "maxItems": 32,
      "title": "Sections",
      "type": "array"
    },
    "shapes": {
      "anyOf": [
        {
          "items": {
            "enum": [
              "timeseries",
              "sequence",
              "image",
              "vector_field",
              "areal_map",
              "points",
              "network",
              "tree",
              "circular",
              "profile",
              "table"
            ],
            "type": "string"
          },
          "maxItems": 64,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Data Explorer: the detected data shapes, best first",
      "title": "Shapes"
    },
    "target": {
      "enum": [
        "dataset",
        "model"
      ],
      "title": "Target",
      "type": "string"
    }
  },
  "required": [
    "target",
    "ref"
  ],
  "title": "ExplorerIndex",
  "type": "object",
  "x-mapi-contract-version": "0.2"
}
