{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://readium.org/webpub-manifest/schema/contributor.schema.json",
  "title": "Contributor",
  "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"
        },
        "role": {
          "type": [
            "string",
            "array"
          ],
          "items": {
            "type": "string"
          }
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "link.schema.json"
          }
        }
      },
      "required": [
        "name"
      ]
    }
  }
}
