{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/randnext/main/json-schema/randnext-item-schema.json",
  "title": "Item",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/randnext-openapi.json#/components/schemas/Item",
  "type": "object",
  "required": [
    "id",
    "type",
    "text",
    "category",
    "language",
    "safety_level",
    "license",
    "permalink"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "joke",
        "quote",
        "question",
        "word"
      ]
    },
    "text": {
      "type": "string"
    },
    "author": {
      "type": [
        "string",
        "null"
      ]
    },
    "category": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "language": {
      "type": "string"
    },
    "safety_level": {
      "type": "string",
      "enum": [
        "family",
        "general"
      ]
    },
    "source_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "license": {
      "type": "string"
    },
    "attribution": {
      "type": [
        "string",
        "null"
      ],
      "description": "Must be displayed when not null."
    },
    "part_of_speech": {
      "type": [
        "string",
        "null"
      ],
      "description": "Words only."
    },
    "permalink": {
      "type": "string"
    }
  }
}