{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://omniarchive.net/data/news/schemas/post.schema.json",
  "title": "Omniarchive news post",
  "type": "object",
  "properties": {
    "$schema": { "type": "string" },
    "title": {
      "type": "string",
      "description": "Title of the post"
    },
    "authors": {
      "type": "array",
      "description": "All authors that worked on the post",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the author"
          },
          "link": {
            "type": "string",
            "description": "The author's website",
            "format": "uri"
          }
        },
        "required": [
          "name"
        ]
      }
    },
    "timestamps": {
      "type": "array",
      "description": "List of timestamps in ISO 8601 standard",
      "minItems": 1,
      "items": {
        "type": "string"
      }
    },
    "thumbnails": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The URL of the thumbnail",
            "format": "uri"
          },
          "alt": {
            "type": "string",
            "description": "The alt text/description of the thumbnail"
          }
        },
        "required": [
          "url"
        ]
      }
    },
    "content": {
      "type": "string",
      "description": "The post content"
    }
  },
  "required": [
    "title",
    "authors",
    "timestamps",
    "content"
  ]
}