{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openspatials.com/developers/spec/0.5/openspatials-catalog.schema.json",
  "title": "OpenSpatials world catalog, version 0.5",
  "description": "The machine-readable registry at /worlds/catalog.json (APP-PROFILE-AND-DIRECTORY.md section 5). One summary entry per world, linking to the world's listing.json and page. Each world's own profile decides what it accepts. Limit 1 MiB, checked on the bytes before parsing; a larger registry needs pages. Unknown fields are allowed and ignored.",
  "type": "object",
  "allOf": [
    { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-directory.schema.json#/$defs/noCode" }
  ],
  "required": ["openspatials", "title", "links", "worlds"],
  "properties": {
    "openspatials": {
      "description": "The format version.",
      "x-openspatials-reason": "unknown-version",
      "enum": ["0.5"]
    },
    "title": { "type": "string", "minLength": 1, "maxLength": 100 },
    "description": { "type": "string", "maxLength": 1000 },
    "updated": { "type": "string", "format": "date-time" },
    "links": {
      "type": "array",
      "maxItems": 16,
      "items": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/$defs/link" }
    },
    "worlds": {
      "type": "array",
      "maxItems": 2000,
      "items": { "$ref": "#/$defs/entry" }
    }
  },
  "$defs": {
    "entry": {
      "description": "A world's summary: the listing's fields people search by, and links to the listing and the page.",
      "type": "object",
      "required": ["id", "owner", "slug", "name", "kind", "play", "links"],
      "properties": {
        "id": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/id" },
        "owner": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/owner" },
        "slug": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/slug" },
        "name": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/name" },
        "kind": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/kind" },
        "description": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/description" },
        "play": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/play" },
        "profile": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/profile" },
        "engine": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/engine" },
        "thumbnail": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/thumbnail" },
        "tags": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/tags" },
        "on": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/properties/on" },
        "added": { "type": "string", "format": "date-time" },
        "updated": { "type": "string", "format": "date-time" },
        "links": {
          "type": "array",
          "minItems": 2,
          "maxItems": 8,
          "items": { "$ref": "https://openspatials.com/developers/spec/0.5/openspatials-listing.schema.json#/$defs/link" }
        }
      }
    }
  }
}
