{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ploti-ai/json-schema/ploti-ai-data-feed-dataset-schema.json",
  "title": "DataFeed.Dataset",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/ploti-ai-v1-openapi.json#/components/schemas/DataFeed.Dataset",
  "type": "object",
  "properties": {
    "datasetId": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "place": {
      "type": "object",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "kind": {
          "type": "string",
          "enum": [
            "county",
            "state",
            "us"
          ]
        }
      },
      "required": [
        "id",
        "name",
        "kind"
      ],
      "additionalProperties": false
    },
    "topic": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "source": {
      "type": "object",
      "properties": {
        "publisher": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "publisher",
        "url"
      ],
      "additionalProperties": false
    },
    "keyed": {
      "type": "boolean"
    },
    "keyColumns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "geometry": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string"
            },
            "srid": {
              "type": "number"
            }
          },
          "required": [
            "type",
            "srid"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "current": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "version": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991,
              "description": "The number of the dataset's release this version was built from, as dataset.changed and datasets changes name it."
            },
            "schemaVersion": {
              "type": "string"
            },
            "releasedAt": {
              "type": "string",
              "description": "When the release went live."
            },
            "rowCount": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "version",
            "schemaVersion",
            "releasedAt",
            "rowCount"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "available",
        "not_built",
        "building",
        "held",
        "failed",
        "awaiting_release"
      ],
      "description": "Why the dataset has no current version, or available when it has one: not_built until a subscription includes it, then building; held or failed when its first version waits on staff; awaiting_release when Ploti has nothing to build it from until its source is released again."
    },
    "refresh": {
      "type": "object",
      "properties": {
        "lastCheckedAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "nextCheckBy": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "lastCheckedAt",
        "nextCheckBy"
      ],
      "additionalProperties": false
    },
    "links": {
      "type": "object",
      "properties": {
        "view": {
          "type": "string",
          "description": "The dataset on Ploti's map."
        }
      },
      "required": [
        "view"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "datasetId",
    "title",
    "description",
    "place",
    "topic",
    "source",
    "keyed",
    "keyColumns",
    "geometry",
    "current",
    "status",
    "refresh",
    "links"
  ],
  "additionalProperties": false
}