{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Record containing a forum topic post.",
      "key": "tid",
      "record": {
        "properties": {
          "category": {
            "description": "Category record key (slug) within the community. Follows AT Protocol record key syntax.",
            "format": "record-key",
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "community": {
            "description": "DID of the community where this record was created. Immutable origin identifier for cross-community attribution.",
            "format": "did",
            "type": "string"
          },
          "content": {
            "description": "Post body content. Open union for extensible content formats.",
            "refs": [
              "forum.barazo.richtext#markdown"
            ],
            "type": "union"
          },
          "facets": {
            "description": "Annotations of text (mentions, URLs, hashtags, etc).",
            "items": {
              "ref": "app.bsky.richtext.facet",
              "type": "ref"
            },
            "type": "array"
          },
          "labels": {
            "description": "Self-label values for content maturity (e.g., sexual, nudity, graphic-media).",
            "refs": [
              "com.atproto.label.defs#selfLabels"
            ],
            "type": "union"
          },
          "langs": {
            "description": "BCP 47 language tags indicating the primary language(s) of the content.",
            "items": {
              "format": "language",
              "type": "string"
            },
            "maxLength": 3,
            "type": "array"
          },
          "publishedAt": {
            "description": "Client-declared timestamp when this post was originally published.",
            "format": "datetime",
            "type": "string"
          },
          "site": {
            "description": "Reference to a site.standard.publication record (at:// URI) or publication URL (https://). Enables cross-app content discovery.",
            "maxLength": 5000,
            "type": "string"
          },
          "tags": {
            "description": "Topic tags. Lowercase alphanumeric + hyphens.",
            "items": {
              "maxGraphemes": 30,
              "maxLength": 300,
              "minLength": 1,
              "type": "string"
            },
            "maxLength": 25,
            "type": "array"
          },
          "title": {
            "description": "Topic title.",
            "maxGraphemes": 200,
            "maxLength": 2000,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "title",
          "content",
          "community",
          "category",
          "publishedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "A forum topic post with title, content, community attribution, and optional tags and content labels.",
  "id": "forum.barazo.topic.post",
  "lexicon": 1
}
