{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gamedevoutsourcing-com/json-schema/gamedevoutsourcing-com-directory-statistics-schema.json",
  "title": "DirectoryStatistics",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gamedevoutsourcing-com-openapi.json#/components/schemas/DirectoryStatistics",
  "type": "object",
  "required": [
    "totals",
    "byRegion",
    "byCountry",
    "byService",
    "byEngine",
    "byPlatform",
    "byTeamSize",
    "sourceUrl",
    "datasetUrl",
    "license",
    "citation",
    "caveats"
  ],
  "properties": {
    "totals": {
      "type": "object",
      "required": [
        "listedStudios",
        "countries",
        "listingsWithoutCountry",
        "claimedListings"
      ],
      "properties": {
        "listedStudios": {
          "type": "integer",
          "description": "Every listing the directory shows. This is the directory's size."
        },
        "countries": {
          "type": "integer",
          "description": "Distinct countries after alias merging (\"UK\" and \"United Kingdom\" are one)."
        },
        "listingsWithoutCountry": {
          "type": "integer",
          "description": "Listings with no usable country recorded. They are in the totals and in no geographic breakdown, so the country counts sum to less than the total."
        },
        "claimedListings": {
          "type": "integer",
          "description": "Listings the studio manages. The rest were compiled by this directory."
        }
      }
    },
    "byRegion": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LabeledCount"
      }
    },
    "byCountry": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LabeledCount"
      }
    },
    "byService": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LabeledCount"
      },
      "description": "Counts overlap: a studio usually offers several services."
    },
    "byEngine": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LabeledCount"
      }
    },
    "byPlatform": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LabeledCount"
      }
    },
    "byTeamSize": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LabeledCount"
      },
      "description": "In ladder order, with a \"Not recorded\" bucket rather than a guess."
    },
    "sourceUrl": {
      "type": "string",
      "format": "uri",
      "description": "The human-readable statistics page. Link this when citing a count."
    },
    "datasetUrl": {
      "type": "string",
      "format": "uri",
      "description": "The same aggregates as a JSON download."
    },
    "license": {
      "type": "string"
    },
    "citation": {
      "$ref": "#/$defs/Citation"
    },
    "caveats": {
      "$ref": "#/$defs/Caveats"
    }
  },
  "$defs": {
    "Caveats": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The standing qualifications on everything this directory publishes. They travel with every payload rather than being stated once, because a caller quotes one response, not a preamble it read earlier. Reproduce the ones that bear on what you are saying."
    },
    "Citation": {
      "type": "string",
      "description": "The attribution line to reproduce when quoting anything from this response."
    },
    "LabeledCount": {
      "type": "object",
      "required": [
        "label",
        "count"
      ],
      "properties": {
        "label": {
          "type": "string"
        },
        "count": {
          "type": "integer",
          "description": "Studios in this bucket."
        }
      }
    }
  }
}