{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://recit.dev/schema/v1/series.json",
  "x-recit-stability": "stable",
  "type": "object",
  "properties": {
    "$schema": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "const": "series"
    },
    "version": {
      "type": "number",
      "const": 1
    },
    "format": {
      "type": "string",
      "const": "webtoon"
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string"
          }
        }
      ]
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "string"
          }
        }
      ]
    },
    "cover": {
      "type": "string",
      "minLength": 1
    },
    "episodes": {
      "minItems": 1,
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1
          },
          {
            "type": "object",
            "properties": {
              "file": {
                "type": "string",
                "minLength": 1
              },
              "title": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  }
                ]
              }
            },
            "required": [
              "file"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  },
  "required": [
    "kind",
    "version",
    "format",
    "title",
    "episodes"
  ],
  "additionalProperties": false
}
