{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/smartwebchat-eu/json-schema/smartwebchat-eu-knowledge-source-input-schema.json",
  "title": "KnowledgeSourceInput",
  "description": "One of four forms, chosen by type. A file travels as base64 so that a retry with the same Idempotency-Key has the same body.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/smartwebchat-eu-api-openapi.json#/components/schemas/KnowledgeSourceInput",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "type",
        "url"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "url"
          ]
        },
        "url": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "type",
        "text"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "text"
          ]
        },
        "text": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "type",
        "question",
        "answer"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "faq"
          ]
        },
        "question": {
          "type": "string"
        },
        "answer": {
          "type": "string"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "type",
        "filename",
        "content_base64"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "file"
          ]
        },
        "filename": {
          "type": "string"
        },
        "content_base64": {
          "type": "string",
          "contentEncoding": "base64"
        }
      }
    }
  ]
}