{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ufoathome.org/case.schema.json",
  "title": "RR0 case",
  "description": "A case, as RR0 writes it: its events, among which the observers' accounts and the interviews. UFO@home reads what is described here and leaves the rest as it is. See https://ufoathome.org/docs/format/",
  "type": "object",
  "properties": {
    "id": {
      "description": "The case's identifier.",
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "summary": {
      "description": "What a link to this case says of it where it is shared as a card (see the Player's share card): a sentence or two, translatable."
    },
    "image": {
      "description": "A picture standing for the case where it is only linked to — see SightingEvent.image.",
      "type": "string"
    },
    "time": {
      "description": "When it happened, as RR0 writes a time (\"1948-07-24 02:45\", \"1954\").",
      "type": "string"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "enum": [
              "event"
            ]
          },
          "eventType": {
            "description": "What kind of event it is.",
            "examples": [
              "sighting",
              "interview",
              "interpretation",
              "article",
              "image",
              "book"
            ],
            "type": "string"
          },
          "id": {
            "description": "What a reading names an account by (`interpretationOf`), local to the case: it has to be unique among the case's events and nowhere else, so that a reference can be read in the file that writes it.",
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "time": {
            "type": "string"
          },
          "place": {
            "description": "Where it happened, as RR0 names a place.",
            "type": "string"
          },
          "by": {
            "description": "Who did it: who held an interview, who made a reading.",
            "type": "array"
          },
          "medium": {
            "description": "An interview's: what it was held through (see InterviewMedium).",
            "enum": [
              "letter",
              "other",
              "in-person",
              "phone",
              "video",
              "chat",
              "email"
            ]
          },
          "title": {},
          "sighting": {
            "description": "An interpretation's, in the older form: the `id` of the recording it interprets.",
            "type": "string"
          },
          "interpretationOf": {
            "description": "An interpretation's: the `id`, or the ids, of the sightings this one is a reading of."
          },
          "interviewOf": {
            "description": "An interview's: the `id`, or the ids, of the sighting events of the witnesses it was held with (see CaseFile.INTERVIEW_EVENT)."
          },
          "summary": {
            "description": "What an event says of itself where its title is not enough: an interview's, what it established."
          }
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true
}
