{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://readium.org/webpub-manifest/schema/series.schema.json",
  "title": "Series",
  "anyOf": [
    {
      "type": "string"
    },
    {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "$ref": "#/$defs/object"
          }
        ]
      }
    },
    {
      "$ref": "#/$defs/object"
    }
  ],
  "$defs": {
    "object": {
      "type": "object",
      "properties": {
        "name": {
          "$ref": "language-map.schema.json"
        },
        "identifier": {
          "type": "string",
          "format": "uri"
        },
        "altIdentifier": {
          "$ref": "altIdentifier.schema.json"
        },
        "sortAs": {
          "$ref": "language-map.schema.json"
        },
        "position": {
          "type": "number"
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "link.schema.json"
          }
        },
        "chapter": {
          "$ref": "chapter.schema.json"
        },
        "episode": {
          "$ref": "episode.schema.json"
        },
        "issue": {
          "$ref": "issue.schema.json"
        },
        "season": {
          "$ref": "season.schema.json"
        },
        "storyArc": {
          "$ref": "storyArc.schema.json"
        },
        "volume": {
          "$ref": "volume.schema.json"
        }
      },
      "required": [
        "name"
      ]
    }
  }
}
