{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "category": {
      "properties": {
        "description": {
          "description": "A line about it, on its page.",
          "maxGraphemes": 300,
          "maxLength": 3000,
          "type": "string"
        },
        "id": {
          "description": "Lower case letters, digits and hyphens, e.g. 'homelab'. Its page is /topics/<id>/, and posts name it by this, so it shouldn't change once posts use it.",
          "maxLength": 32,
          "type": "string"
        },
        "label": {
          "description": "As the site shows it, e.g. 'Infra & delivery'. Can change any time.",
          "maxGraphemes": 50,
          "maxLength": 500,
          "type": "string"
        }
      },
      "required": [
        "id",
        "label"
      ],
      "type": "object"
    },
    "main": {
      "description": "The categories posts on skiddle.id belong to, in the order the site shows them. One record, key 'self'. A post names its category by id (id.skiddle.post's category).",
      "key": "literal:self",
      "record": {
        "properties": {
          "categories": {
            "description": "In the order they're shown.",
            "items": {
              "ref": "#category",
              "type": "ref"
            },
            "maxLength": 50,
            "type": "array"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "categories",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "id.skiddle.categories",
  "lexicon": 1
}
