{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/radix-wiki/json-schema/radix-wiki-block-schema.json",
  "title": "Block",
  "description": "A typed block with a unique `id` (UUID) and a `type`. A `content` block carries semantic HTML in `text`; an `infobox` carries nested `blocks`. An `events` block carries `items: [{ id, date, end?, text }]`, each date a year, month or day (`2026`, `2026-11`, `2026-11-12`) and `text` inline HTML saying what and where, in any order: the page sorts them into upcoming and past by the day it is read. A `locations` block carries `items: [{ id, name?, address?, map?, phone?, email?, hours?, timeZone?, note? }]`, each with its address (plain text, a line to a line) or its `hours`, rows of `{ days: [\"mon\"…\"sun\"], opens: \"08:00\", closes: \"18:00\" }`; the page groups the days and says whether each place is open by its own clock. For any other type, copy the shape of one already on a page: get_page with `blocks: true` (or GET /api/wiki/{path}) returns blocks as stored.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/radix-wiki-openapi.json#/components/schemas/Block",
  "type": "object",
  "required": [
    "id",
    "type"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "type": {
      "type": "string",
      "enum": [
        "content",
        "banner",
        "columns",
        "list",
        "assetPrice",
        "networkChart",
        "rssFeed",
        "codeTabs",
        "linkGrid",
        "tipJar",
        "references",
        "locations",
        "events",
        "infobox",
        "stats",
        "testimonial"
      ]
    },
    "text": {
      "type": "string",
      "description": "Semantic HTML (content, banner)"
    },
    "blocks": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Nested leaf blocks (infobox)"
    },
    "source": {
      "type": "string",
      "enum": [
        "under",
        "newest",
        "chosen"
      ],
      "description": "Where a list's pages come from (list): `under` the pages in the category `under` names, `newest` the newest `count` pages (within `under` if given), `chosen` the pages in `pages`"
    },
    "under": {
      "type": "string",
      "description": "A tag path, such as `contents/tech` (list)"
    },
    "count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "description": "How many of the newest (list)"
    },
    "pages": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 100,
      "description": "Page ids in display order (list, `chosen`): the `id` get_page returns with `blocks: true`"
    },
    "show": {
      "type": "string",
      "enum": [
        "links",
        "cards"
      ],
      "description": "Each page as a link with its age, or as a card with its banner and opening line (list)"
    },
    "metric": {
      "type": "string",
      "enum": [
        "transactions",
        "activeAccounts",
        "newAccounts",
        "newComponents",
        "newResources",
        "nftsMinted",
        "feesXrd",
        "royaltiesXrd"
      ],
      "description": "The series charted (networkChart)"
    }
  },
  "additionalProperties": true
}