{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/morvs-ai/json-schema/morvs-ai-dataset-coverage-catalog-schema.json",
  "title": "DatasetCoverageCatalog",
  "description": "JSON-LD view of public local dataset coverage. Source-specific usage terms apply; the catalog is not a blanket license grant.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/morvs-ai-openapi.json#/components/schemas/DatasetCoverageCatalog",
  "type": "object",
  "required": [
    "@context",
    "@type",
    "@id",
    "name",
    "usageInfo",
    "rights",
    "dateModified",
    "datasets"
  ],
  "properties": {
    "@context": {
      "type": "object"
    },
    "@type": {
      "type": "string",
      "const": "DataCatalog"
    },
    "@id": {
      "type": "string",
      "const": "https://api.morvs.ai/coverage"
    },
    "name": {
      "type": "string"
    },
    "usageInfo": {
      "type": "string",
      "format": "uri",
      "description": "Source-specific terms policy; not a blanket license."
    },
    "rights": {
      "type": "string"
    },
    "dateModified": {
      "type": "string",
      "format": "date-time",
      "description": "Time the response was generated, not the latest upstream or local dataset update."
    },
    "datasets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DatasetCoverageRow"
      }
    }
  },
  "$defs": {
    "DatasetCoverageRow": {
      "type": "object",
      "description": "One materialized local dataset count. A zero count can mean that no coverage row is cached; this is not an upstream census.",
      "required": [
        "slug",
        "name",
        "count",
        "last_refresh",
        "agency",
        "source_url",
        "api_path"
      ],
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "description": "Locally indexed row count from the materialized coverage table."
        },
        "last_refresh": {
          "type": [
            "string",
            "null"
          ],
          "description": "Recorded local coverage timestamp or null. Its basis varies by dataset and it is not proof of current upstream completeness."
        },
        "agency": {
          "type": "string"
        },
        "source_url": {
          "type": "string",
          "format": "uri"
        },
        "api_path": {
          "type": "string"
        }
      }
    }
  }
}