{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://get.aiware.com/schemas/v1/text/text.json",
  "title": "vtn-standard.text",
  "description": "Standard engine output for Text at Veritone",
  "type": "object",
  "definitions": {
    "textObject": {
      "allOf": [
        {
          "$ref": "https://get.aiware.com/schemas/v1/master.json#/definitions/objectResult"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "text"
            }
          },
          "required": [
            "text"
          ]
        }
      ]
    }
  },
  "allOf": [
    {
      "$ref": "https://get.aiware.com/schemas/v1/master.json#/definitions/PREAMBLE"
    },
    {
      "$ref": "https://get.aiware.com/schemas/v1/master.json#/definitions/validated"
    },
    {
      "properties": {
        "validationContracts": {
          "type": "array",
          "contains": {
            "const": "text"
          }
        },
        "object": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/textObject"
          }
        },
        "series": {
          "type": "array",
          "items": {
            "allOf": [
              {
                "$ref": "https://get.aiware.com/schemas/v1/master.json#/definitions/seriesItem"
              },
              {
                "properties": {
                  "object": {
                    "allOf": [
                      {
                        "$ref": "#/definitions/textObject"
                      },
                      {
                        "$ref": "https://get.aiware.com/schemas/v1/master.json#/definitions/noDocumentIndexing"
                      }
                    ]
                  }
                },
                "required": [
                  "object"
                ]
              }
            ]
          }
        }
      }
    },
    {
      "anyOf": [
        {
          "required": [
            "object"
          ]
        },
        {
          "required": [
            "series"
          ]
        }
      ]
    }
  ]
}
