{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nightash.org/api/news/v1/edition.schema.json",
  "title": "News Edition",
  "type": "object",
  "required": [
    "schema_version",
    "type",
    "edition_id",
    "published_at",
    "available_languages",
    "publisher",
    "editorial_authority",
    "articles"
  ],
  "properties": {
    "schema_version": {
      "const": "2.0"
    },
    "type": {
      "const": "NewsEdition"
    },
    "edition_id": {
      "type": "string"
    },
    "published_at": {
      "type": "string",
      "format": "date-time"
    },
    "available_languages": {
      "type": "array",
      "minItems": 4,
      "uniqueItems": true,
      "items": {
        "enum": [
          "en",
          "tr",
          "ar",
          "fa"
        ]
      }
    },
    "publisher": {
      "type": "object"
    },
    "editorial_authority": {
      "type": "object"
    },
    "articles": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "edition_id",
          "published_at",
          "available_languages",
          "urls",
          "author",
          "publisher",
          "publishing_principles",
          "headline",
          "dek",
          "story",
          "infrastructure",
          "image",
          "tags"
        ]
      }
    }
  }
}
