{
  "lexicon": 1,
  "id": "app.bsky.embed.gallery",
  "description": "An assortment of media embedded in a Bluesky record (eg, a post).",
  "defs": {
    "main": {
      "type": "object",
      "required": ["items"],
      "properties": {
        "items": {
          "type": "array",
          "maxLength": 20,
          "description": "The schema-level maxLength of 20 is a future-proof ceiling. Clients should currently enforce a soft limit of 10 items in authoring UIs.",
          "items": {
            "type": "union",
            "refs": ["#image"],
            "description": "The media items in the gallery. Each item may be of a different type, but all types must be supported by the client."
          }
        }
      }
    },
    "image": {
      "type": "object",
      "required": ["image", "alt", "aspectRatio"],
      "properties": {
        "image": {
          "type": "blob",
          "accept": ["image/*"],
          "maxSize": 2000000
        },
        "alt": {
          "type": "string",
          "description": "Alt text description of the image, for accessibility."
        },
        "aspectRatio": {
          "type": "ref",
          "ref": "app.bsky.embed.defs#aspectRatio"
        }
      }
    },
    "view": {
      "type": "object",
      "required": ["items"],
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "type": "union",
            "refs": ["#viewImage"]
          }
        }
      }
    },
    "viewImage": {
      "type": "object",
      "required": ["thumbnail", "fullsize", "alt", "aspectRatio"],
      "properties": {
        "thumbnail": {
          "type": "string",
          "format": "uri",
          "description": "Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View."
        },
        "fullsize": {
          "type": "string",
          "format": "uri",
          "description": "Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View."
        },
        "alt": {
          "type": "string",
          "description": "Alt text description of the image, for accessibility."
        },
        "aspectRatio": {
          "type": "ref",
          "ref": "app.bsky.embed.defs#aspectRatio"
        }
      }
    }
  }
}

