{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://lucidapi.com/assets/examples/dream-entry.schema.json",
  "title": "Illustrative dream journal entry",
  "description": "A static teaching example, not a hosted API contract. Ownership and authorization require separate application controls.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "entry_id",
    "revision",
    "text",
    "origin",
    "lucidity"
  ],
  "properties": {
    "entry_id": {
      "type": "string",
      "pattern": "^entry_[A-Za-z0-9_]{1,80}$"
    },
    "revision": {
      "type": "integer",
      "minimum": 1
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000
    },
    "experience_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "origin": {
      "const": "user_report"
    },
    "lucidity": {
      "enum": [
        "reported_lucid",
        "reported_not_lucid",
        "unspecified"
      ]
    }
  }
}
