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