{
  "lexicon": 1,
  "id": "pub.oysters.post",
  "defs": {
    "main": {
      "type": "record",
      "description": "A submission to an Oysters board: a link, a text post, or both.",
      "key": "tid",
      "record": {
        "type": "object",
        "required": [
          "title",
          "createdAt"
        ],
        "properties": {
          "title": {
            "type": "string",
            "description": "The headline shown in the feed.",
            "minLength": 1,
            "maxGraphemes": 120,
            "maxLength": 480
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The link being submitted. A post carries a url, a text body, or both; the lexicon cannot express that either-or, so consumers must not assume url is present."
          },
          "text": {
            "type": "string",
            "description": "The body, in plain text. Present on text posts and on link posts that add context.",
            "maxGraphemes": 10000,
            "maxLength": 40000
          },
          "tags": {
            "type": "array",
            "description": "Author-chosen topic tags, lowercased. Boards may recognise only a subset.",
            "maxLength": 5,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxGraphemes": 32,
              "maxLength": 128
            }
          },
          "langs": {
            "type": "array",
            "description": "BCP-47 language codes for title and text.",
            "maxLength": 3,
            "items": {
              "type": "string",
              "format": "language"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "When the author made the submission. Client-declared, so an appview ranks on its own receipt time."
          }
        }
      }
    }
  }
}
