{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/internetdata-io/json-schema/internetdata-io-database-metadata-schema.json",
  "title": "DatabaseMetadata",
  "description": "The build document written by the exporter, served through unchanged.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/internetdata-io-openapi.yaml#/components/schemas/DatabaseMetadata",
  "type": "object",
  "required": [
    "id",
    "updated",
    "entries",
    "schema",
    "size"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "update_freq": {
      "type": "string",
      "description": "How often a new build is published."
    },
    "updated": {
      "type": "string",
      "format": "date",
      "description": "ISO-8601 date (YYYY-MM-DD) the published build was generated on."
    },
    "entries": {
      "type": "integer",
      "format": "int64",
      "description": "Row count in the current build."
    },
    "schema": {
      "type": "object",
      "description": "Columns, keyed by format.",
      "additionalProperties": {
        "type": "array",
        "items": {
          "$ref": "#/$defs/DatabaseMetadataColumn"
        }
      }
    },
    "sample": {
      "type": "object",
      "description": "A few real rows, keyed by format.",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "object"
        }
      }
    },
    "size": {
      "type": "object",
      "description": "Bytes per format.",
      "additionalProperties": {
        "type": "integer",
        "format": "int64"
      }
    },
    "sample_size": {
      "type": "object",
      "description": "Bytes per format of the evaluation sample, where one is published.",
      "additionalProperties": {
        "type": "integer",
        "format": "int64"
      }
    },
    "sample_entries": {
      "type": "integer",
      "description": "Row count in the evaluation sample."
    }
  },
  "$defs": {
    "DatabaseMetadataColumn": {
      "type": "object",
      "required": [
        "name",
        "type"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "description": {
          "type": "string"
        }
      }
    }
  }
}