{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/portamora-app/json-schema/portamora-app-world-schema.json",
  "title": "World",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/portamora-app-openapi.yml#/components/schemas/World",
  "type": "object",
  "properties": {
    "visibility": {
      "type": "string",
      "enum": [
        "public",
        "unlisted"
      ]
    },
    "id": {
      "type": "string",
      "minLength": 16,
      "maxLength": 16,
      "pattern": "^world_[6789BCDFGHJKLMNPQRTWbcdfghjkmnpqrtwz]{10}$",
      "description": "Case-sensitive world identifier with 10 safe-alphabet characters after the prefix."
    },
    "title": {
      "type": "string"
    },
    "tagline": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "thumbnailKey": {
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "published",
        "offline",
        "removed"
      ]
    },
    "currentVersionId": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 18,
      "maxLength": 18,
      "pattern": "^version_[6789BCDFGHJKLMNPQRTWbcdfghjkmnpqrtwz]{10}$",
      "description": "Case-sensitive version identifier with 10 safe-alphabet characters after the prefix."
    },
    "publishedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "playsTotal": {
      "type": "integer",
      "minimum": 0
    },
    "likesTotal": {
      "type": "integer",
      "minimum": 0
    },
    "dislikesTotal": {
      "type": "integer",
      "minimum": 0
    },
    "bytesUnpacked": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 32,
        "pattern": "^[a-z0-9][a-z0-9_-]*$"
      }
    },
    "creator": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 15,
          "maxLength": 15,
          "pattern": "^user_[6789BCDFGHJKLMNPQRTWbcdfghjkmnpqrtwz]{10}$",
          "description": "Case-sensitive user identifier with 10 safe-alphabet characters after the prefix."
        },
        "handle": {
          "type": "string",
          "minLength": 3,
          "maxLength": 30,
          "pattern": "^[a-z0-9](?:[a-z0-9-]*[a-z0-9])$"
        },
        "displayName": {
          "type": "string"
        },
        "bio": {
          "type": "string"
        },
        "avatarKey": {
          "type": [
            "string",
            "null"
          ]
        },
        "links": {
          "type": "object",
          "properties": {
            "self": {
              "type": "string",
              "format": "uri"
            },
            "profile": {
              "type": "string",
              "format": "uri"
            },
            "avatar": {
              "type": [
                "string",
                "null"
              ],
              "format": "uri"
            }
          },
          "required": [
            "self",
            "profile",
            "avatar"
          ]
        }
      },
      "required": [
        "id",
        "handle",
        "displayName",
        "bio",
        "avatarKey",
        "links"
      ]
    },
    "links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "string",
          "format": "uri"
        },
        "details": {
          "type": "string",
          "format": "uri"
        },
        "play": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "thumbnail": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      },
      "required": [
        "self",
        "details",
        "play",
        "thumbnail"
      ]
    }
  },
  "required": [
    "id",
    "title",
    "tagline",
    "description",
    "thumbnailKey",
    "status",
    "currentVersionId",
    "publishedAt",
    "playsTotal",
    "likesTotal",
    "dislikesTotal",
    "bytesUnpacked",
    "tags",
    "creator",
    "links"
  ]
}