{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sbox-watch/json-schema/sbox-watch-organization-directory-schema.json",
  "title": "OrganizationDirectory",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sbox-watch-openapi.json#/components/schemas/OrganizationDirectory",
  "type": "object",
  "additionalProperties": true,
  "required": [
    "generation",
    "generatedAt",
    "contentNotice",
    "query",
    "sort",
    "pagination",
    "summary",
    "organizations",
    "canonicalUrl",
    "markdownUrl",
    "apiUrl"
  ],
  "properties": {
    "generation": {
      "type": [
        "string",
        "number"
      ]
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "contentNotice": {
      "type": "string"
    },
    "canonicalUrl": {
      "type": "string",
      "format": "uri"
    },
    "markdownUrl": {
      "type": "string",
      "format": "uri"
    },
    "apiUrl": {
      "type": "string",
      "format": "uri"
    },
    "query": {
      "type": "string"
    },
    "sort": {
      "type": "string"
    },
    "pagination": {
      "$ref": "#/$defs/Pagination"
    },
    "summary": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "label",
          "value"
        ],
        "properties": {
          "label": {
            "type": "string"
          },
          "value": {
            "type": "number"
          }
        }
      }
    },
    "organizations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Organization"
      }
    }
  },
  "$defs": {
    "Organization": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "ident",
        "title",
        "summary",
        "description",
        "memberCount",
        "packageCount",
        "publicGames",
        "playersNow",
        "playersPeak24h",
        "canonicalUrl",
        "markdownUrl"
      ],
      "properties": {
        "ident": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "thumb": {
          "type": [
            "string",
            "null"
          ]
        },
        "summary": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "website": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "discord": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "created": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "memberCount": {
          "type": "number"
        },
        "packageCount": {
          "type": "number"
        },
        "publicGames": {
          "type": "number"
        },
        "publicMaps": {
          "type": "number"
        },
        "publicLibraries": {
          "type": "number"
        },
        "playersNow": {
          "type": "number"
        },
        "playersPeak24h": {
          "type": "number"
        },
        "lastGameUpdated": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "canonicalUrl": {
          "type": "string",
          "format": "uri"
        },
        "markdownUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Pagination": {
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "page": {
          "type": "integer",
          "minimum": 1
        },
        "pageSize": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100
        },
        "totalItems": {
          "type": "integer",
          "minimum": 0
        },
        "totalPages": {
          "type": "integer",
          "minimum": 0
        },
        "hasPrevious": {
          "type": "boolean"
        },
        "hasNext": {
          "type": "boolean"
        }
      },
      "required": [
        "page",
        "pageSize",
        "totalItems",
        "totalPages",
        "hasPrevious",
        "hasNext"
      ]
    }
  }
}